roddyyaga / ppx_rapper

Syntax extension for writing SQL in OCaml
Other
139 stars 18 forks source link

more examples of connection creation, please! #23

Closed phstrauss closed 1 year ago

phstrauss commented 2 years ago

Hello! My first encounter with Lwt is by using ppx_rapper_lwt (even first encounter with a monadic pattern to conform to) and I lack something which will probably looks trivial to you: a connection (db handler) creation and use example! a non pooled one, because I'm using sqlite3. I know, I know, shame on me, I'm an eternal beginner with ocaml.

Also, is the Db handler always a whole module or is there a lighter alternative?

Thank U!

roddyyaga commented 2 years ago

Hi, I've added an example of that to the examples. The connection is a caqti thing, not ppx_rapper, so you'll probably find the caqti docs more useful.