Legend:
Library
Module
Module type
Parameter
Class
Class type
Library
Module
Module type
Parameter
Class
Class type
SQL IO utilities for Async.
include Caqti_sql_io.S
with type 'a future := 'a Async_kernel.Deferred.Or_error.t
val read_sql_statement :
('a -> char option Async_kernel.Deferred.Or_error.t) ->
'a ->
string option Async_kernel.Deferred.Or_error.t
read_sql_statement read_char chan
reads the next semicolon-terminated SQL statement from chan
, taking care to skip over quoted semicolons. read_char chan
shall return the next character from chan
, or None
when the end of file has been reached. A final semicolon is optional and any trailing white space after it will be ignored.
This can be used e.g. to read in SQL schemas or schema updates from a file for automatic initialization and updates of tables, sequences, functions, views, etc.