blob: 1c0e2bb4cfe4a3ecfe2b4d3441086a3d9149ecbc (
plain)
1
2
3
4
5
6
7
8
|
(** Helper to embed an SQL string literal into a query string.
Identifiers are not handled here: they have the abstract type
[Model.Identifier.t], whose only constructor validates the string, and are
quoted with [Model.Identifier.quote]. *)
let quote_literal : string -> string =
fun s -> "'" ^ String.concat "''" (String.split_on_char '\'' s) ^ "'"
|