3 ms·
Just a note that in PG'OCaml (an OCaml interface to PostgreSQL), you can write: "insert into foo (col1,col2,col3) values ($a, $b, $c)" and it creates the
by rwmj 11y ago
Just a note that in PG'OCaml (an OCaml interface to PostgreSQL), you can write:
"insert into foo (col1,col2,col3) values ($a, $b, $c)"
and it creates the safe prepared statement with ? placeholders. At compile time. Type-checked against the database to make sure your program types match your column types.
http://pgocaml.forge.ocamlcore.org/ http://pgocaml.forge.ocamlcore.org/
- annnnd 11y agoI would be very careful with such SQL statements. I am guessing it relies on some intrinsic fields' order? That could change anytime. Order of fields shouldn't have any impact on you app, but I think in your case it does.
- rwmj 11y agoThe "..." wasn't literal. I have amended the post to make this clear.