Code Monkey home page Code Monkey logo

ocaml-gensqlite's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

qnix

ocaml-gensqlite's Issues

sigil for last inserted rowid

Adding a sigil or some other built-in support to return the last inserted rowid would avoid having to carry the DB handle around in the application alongside gensqlite's generated query functions.

Update OPAM package?

Hi j0sh,
First of all, awesome work on gensqlite! It's been super convenient to use for my projects thus far. Anyways, the package available on OPAM corresponds to the initial commit for this repo (August 12, 2015). However, there were some changes made since then that aren't officially released to OPAM. I'm not sure if they're considered incomplete (in which case I could help out keeping them up-to-date), but would you be willing to update the release on OPAM?
Thanks, nv

Discuss syntax for placeholders

I see you started working on a replacement for sigils. Do you mind if I propose a syntax I like?

It is interesting or desirable to use familiar idioms, like the ${…} string interpolation. Some widespread languages (the shell, BSD Make at least) use a suffix introduced by a semicolon to add pepper and salt to a variable, such as default values or various transformations. Here are the various SQL statements found in sample.ml with a proposal for another syntax:

  • insert into users(name) values(>@name) –> INSERT INTO users(name) values(${name:%s})
  • select <:id, <@name, strftime('%s', <?created) from users where name = >@name –> SELECT ${id:@d}, ${name:@s}, strftime('%s', ${created:@h}) FROM users WHERE name = ${name:%s}

This also use the @ vs % convention for formatting input and output fields, as sqlexpr does.

I am currently giving gensqlite a try and it looks very promising, thanks for writing it!

Deduplicate repeated named params

Duplicate named params of the same type should only be bound once. (What to do if there are params with the same name but different type?)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.