ocaml-community / ocaml-mariadb

OCaml bindings to MariaDB, supporting the nonblocking API
55 stars 18 forks source link

Support for syntax not allowed as prepared statements #35

Open paurkedal opened 3 years ago

paurkedal commented 3 years ago

MariaDB/MySQL does not allow certain syntax in prepared statements, so it seems, at least for now, the mysql_query and the related async functions are needed to support the full SQL language.

I had a look at it in connection with paurkedal/ocaml-caqti#42, but if I've understood the MariaDB documentation correctly, the result processing of the non-prepared API is quite orthogonal to that of the prepared API. I suspect it would require significant refactoring or split of the result handling.

apeschar commented 2 years ago

MariaDB supports all syntax in prepared statements from version 10.6.2 (docs), making this issue irrelevant.

paurkedal commented 2 years ago

It may be too early to expect people to upgrade their database servers. At least Ubuntu 20.04 LTS and RHEL 7 and 8, which are still under support, distribute older versions.