Closed phstrauss closed 2 years ago
Oh I guess it's a ppx_rapper issue rather than a caqti one, sorry for the noise.
My assumption has been that we cannot rely on support for or a certain behaviour when multiple statements are sent to the server in a single request, though it's probably okay if at most the last statement returns any rows. I usually write the schemas and schema updates as separate SQL files. Rejecting semicolon in the parser allows splitting up statements when e.g. reading them from such a file.
It is possible to insert a semicolon by passing an env
function with a variable which expands to a semicolon. Also, the next version will allow semicolon for the new API functions. The reason was to support single statements containing semicolon as seen in the sqlite3 syntax (#87), rather than multiple statements.
Hello, How do I create a schema using caqti with the semicolon restriction, here's my schema creation code, which happen to not work. I'm using the sqlite3 backend on ubuntu 20.04 and OCaml 4.13.1: