module Postgresql:sig..end
typeoid =int
type large_object
module FFormat:sig..end
type ftype =
| |
BOOL |
| |
BYTEA |
| |
CHAR |
| |
NAME |
| |
INT8 |
| |
INT2 |
| |
INT2VECTOR |
| |
INT4 |
| |
REGPROC |
| |
TEXT |
| |
OID |
| |
TID |
| |
XID |
| |
CID |
| |
OIDVECTOR |
| |
POINT |
| |
LSEG |
| |
PATH |
| |
BOX |
| |
POLYGON |
| |
LINE |
| |
FLOAT4 |
| |
FLOAT8 |
| |
ABSTIME |
| |
RELTIME |
| |
TINTERVAL |
| |
UNKNOWN |
| |
CIRCLE |
| |
CASH |
| |
MACADDR |
| |
INET |
| |
CIDR |
| |
ACLITEM |
| |
BPCHAR |
| |
VARCHAR |
| |
DATE |
| |
TIME |
| |
TIMESTAMP |
| |
TIMESTAMPTZ |
| |
INTERVAL |
| |
TIMETZ |
| |
BIT |
| |
VARBIT |
| |
NUMERIC |
| |
REFCURSOR |
| |
REGPROCEDURE |
| |
REGOPER |
| |
REGOPERATOR |
| |
REGCLASS |
| |
REGTYPE |
| |
RECORD |
| |
CSTRING |
| |
ANY |
| |
ANYARRAY |
| |
VOID |
| |
TRIGGER |
| |
LANGUAGE_HANDLER |
| |
INTERNAL |
| |
OPAQUE |
| |
ANYELEMENT |
type result_status =
| |
Empty_query |
(* |
String sent to the backend was empty
| *) |
| |
Command_ok |
(* |
Successful completion of a command returning no data
| *) |
| |
Tuples_ok |
(* |
The query successfully executed
| *) |
| |
Copy_out |
(* |
Copy Out (from server) data transfer started
| *) |
| |
Copy_in |
(* |
Copy In (to server) data transfer started
| *) |
| |
Bad_response |
(* |
The server's response was not understood
| *) |
| |
Nonfatal_error |
|||
| |
Fatal_error |
type getline_result =
| |
EOF |
(* |
End of input reached
| *) |
| |
LineRead |
(* |
Entire line has been read
| *) |
| |
BufFull |
(* |
Buffer full but terminating newline not encountered
| *) |
type getline_async_result =
| |
EndOfData |
(* |
End-of-copy-data marker recognized
| *) |
| |
NoData |
(* |
No data available
| *) |
| |
DataRead of |
(* | DataRead n indicates n bytes of read data | *) |
| |
PartDataRead of |
(* |
Like
DataRead, but data only partially read | *) |
type seek_cmd =
| |
SEEK_SET |
(* |
Seek from start of large object
| *) |
| |
SEEK_CUR |
(* |
Seek from current read/write position of large object
| *) |
| |
SEEK_END |
(* |
Seek from end of large object
| *) |
type error =
| |
Field_out_of_range of |
| |
Tuple_out_of_range of |
| |
Binary |
| |
Connection_failure of |
| |
Unexpected_status of |
| |
Cancel_failure of |
Field_out_of_range (i, n) - access to field i not within range n
Tuple_out_of_range (i, n) - access to tuple i not within range n
Binary - result consists of binary tuple data
Connection_failure msg - connection failed due to reason msg
Unexpected_status (stat, msg, expected) - result status stat was not in
expected due to error msg
exception Error of error
Error error indicates an errorval string_of_error : error -> stringstring_of_error error convert error to a human-readable messageexception Oid of oid
Oid oid conversion from an oid to an ftype encountered an unknown oidval unescape_bytea : string -> stringunescape_bytea str unescapes binary string str. This function
supports the new hex format for encoding bytea strings (introduced
in Postgresql 9.0) even if the local libpq library is from an
older version.val ftype_of_oid : oid -> ftypeftype_of_oid oid converts oid to an ftype.val oid_of_ftype : ftype -> oidoid_of_ftype ftype converts ftype to an oid.val string_of_ftype : ftype -> stringstring_of_ftype ftype converts ftype to a string.val ftype_of_string : string -> ftypestring_of_ftype ftype converts ftype to a string.val result_status : result_status -> stringresult_status stat convert status stat to a human-readable messageval invalid_oid : oidinvalid_oid invalid Oid.val null : stringnull can be used as an element of the optional argument parameters
passed to the exec or send_query method to indicate a NULL value.class type result =object..end
type connection_status =
| |
Ok |
| |
Bad |
type conninfo_option = {
|
cio_keyword : |
(* |
Keyword of option
| *) |
|
cio_envvar : |
(* |
Fallback environment variable name
| *) |
|
cio_compiled : |
(* |
Fallback compiled in default value
| *) |
|
cio_val : |
(* |
Current value of option, or NULL
| *) |
|
cio_label : |
(* |
Label for field in connect dialog
| *) |
|
cio_dispchar : |
(* |
Character to display for this field in dialog
| *) |
|
cio_dispsize : |
(* |
Field size in characters for dialog
| *) |
val conndefaults : unit -> conninfo_option arrayconndefaults ()conninfo_optionclass connection :?host:string -> ?hostaddr:string -> ?port:string -> ?dbname:string -> ?user:string -> ?password:string -> ?options:string -> ?tty:string -> ?requiressl:string -> ?conninfo:string -> unit ->object..end