package caqti-async

  1. Overview
  2. Docs
Async support for Caqti

Install

dune-project
 Dependency

Authors

Maintainers

Sources

caqti-v1.3.0.tbz
sha256=a15d71b6428997703273dc6d55a99045fb62c3243c751de5ae8c3fc25421f16a
sha512=386502d9ea2f1769081b81e6888bf4c2a27248498eabc0d4eb4adfde04c74f48f2aa587c0ce3a34604c73d157ed6533052b4d0b9a0fb3f352929ef847f3aa9fa

doc/caqti-async/Caqti_async_sql_io/index.html

Module Caqti_async_sql_ioSource

SQL IO utilities for Async.

include Caqti_sql_io.S with type 'a future := 'a Async_kernel.Deferred.Or_error.t
Sourceval 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.