<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <link rel="stylesheet" href="style.css" type="text/css"> <meta content="text/html; charset=iso-8859-1" http-equiv="Content-Type"> <link rel="Start" href="index.html"> <link rel="Up" href="PGOCaml_generic.html"> <link title="Index of types" rel=Appendix href="index_types.html"> <link title="Index of exceptions" rel=Appendix href="index_exceptions.html"> <link title="Index of values" rel=Appendix href="index_values.html"> <link title="Index of modules" rel=Appendix href="index_modules.html"> <link title="Index of module types" rel=Appendix href="index_module_types.html"> <link title="PGOCaml" rel="Chapter" href="PGOCaml.html"> <link title="PGOCaml_generic" rel="Chapter" href="PGOCaml_generic.html"><link title="Connection management" rel="Section" href="#6_Connectionmanagement"> <link title="Transactions" rel="Section" href="#6_Transactions"> <link title="Serial column" rel="Section" href="#6_Serialcolumn"> <link title="Miscellaneous" rel="Section" href="#6_Miscellaneous"> <link title="Low level query interface - DO NOT USE DIRECTLY" rel="Section" href="#6_LowlevelqueryinterfaceDONOTUSEDIRECTLY"> <link title="Low level type conversion functions - DO NOT USE DIRECTLY" rel="Section" href="#6_LowleveltypeconversionfunctionsDONOTUSEDIRECTLY"> <title>PGOCaml_generic.Make</title> </head> <body> <div class="navbar"> <a href="PGOCaml_generic.html">Up</a> </div> <center><h1>Functor <a href="type_PGOCaml_generic.Make.html">PGOCaml_generic.Make</a></h1></center> <br> <pre><span class="keyword">module</span> Make: <div class="sig_block"><code class="code">functor (</code><code class="code">Thread</code><code class="code"> : </code><code class="type"><a href="PGOCaml_generic.THREAD.html">THREAD</a></code><code class="code">) -> </code><code class="type"><a href="PGOCaml_generic.PGOCAML_GENERIC.html">PGOCAML_GENERIC</a></code><code class="type"> with type 'a monad = 'a Thread.t</code></div></pre><table border="0" cellpadding="3" width="100%"> <tr> <td align="left" valign="top" width="1%%"><b>Parameters: </b></td> <td> <table class="paramstable"> <tr> <td align="center" valign="top" width="15%"> <code>Thread</code></td> <td align="center" valign="top">:</td> <td><code class="type"><a href="PGOCaml_generic.THREAD.html">THREAD</a></code> </table> </td> </tr> </table> <hr width="100%"> <pre><span class="keyword">type</span> <a name="TYPEt"></a><code class="type">'a</code> t </pre> <div class="info"> Database handle.<br> </div> <pre><span class="keyword">type</span> <a name="TYPEmonad"></a><code class="type">'a</code> monad </pre> <pre><span class="keyword">exception</span> <a name="EXCEPTIONError"></a>Error <span class="keyword">of</span> <code class="type">string</code></pre> <div class="info"> For library errors.<br> </div> <pre><span class="keyword">exception</span> <a name="EXCEPTIONPostgreSQL_Error"></a>PostgreSQL_Error <span class="keyword">of</span> <code class="type">string * (char * string) list</code></pre> <div class="info"> For errors generated by the PostgreSQL database back-end. The first argument is a printable error message. The second argument is the complete set of error fields returned from the back-end. See <code class="code">http://www.postgresql.org/docs/8.1/static/protocol-error-fields.html</code><br> </div> <br> <a name="6_Connectionmanagement"></a> <h6>Connection management</h6><br> <pre><span class="keyword">val</span> <a name="VALconnect"></a>connect : <code class="type">?host:string -><br> ?port:int -><br> ?user:string -><br> ?password:string -><br> ?database:string -><br> ?unix_domain_socket_dir:string -><br> unit -><br> 'a <a href="PGOCaml_generic.PGOCAML_GENERIC.html#TYPEt">t</a> <a href="PGOCaml_generic.PGOCAML_GENERIC.html#TYPEmonad">monad</a></code></pre><div class="info"> Connect to the database. The normal <code class="code">$PGDATABASE</code>, etc. environment variables are available.<br> </div> <pre><span class="keyword">val</span> <a name="VALclose"></a>close : <code class="type">'a <a href="PGOCaml_generic.PGOCAML_GENERIC.html#TYPEt">t</a> -><br> unit <a href="PGOCaml_generic.PGOCAML_GENERIC.html#TYPEmonad">monad</a></code></pre><div class="info"> Close the database handle. You must call this after you have finished with the handle, or else you will get leaked file descriptors.<br> </div> <pre><span class="keyword">val</span> <a name="VALping"></a>ping : <code class="type">'a <a href="PGOCaml_generic.PGOCAML_GENERIC.html#TYPEt">t</a> -><br> unit <a href="PGOCaml_generic.PGOCAML_GENERIC.html#TYPEmonad">monad</a></code></pre><div class="info"> Ping the database. If the database is not available, some sort of exception will be thrown.<br> </div> <br> <a name="6_Transactions"></a> <h6>Transactions</h6><br> <pre><span class="keyword">val</span> <a name="VALbegin_work"></a>begin_work : <code class="type">'a <a href="PGOCaml_generic.PGOCAML_GENERIC.html#TYPEt">t</a> -><br> unit <a href="PGOCaml_generic.PGOCAML_GENERIC.html#TYPEmonad">monad</a></code></pre><div class="info"> Start a transaction.<br> </div> <pre><span class="keyword">val</span> <a name="VALcommit"></a>commit : <code class="type">'a <a href="PGOCaml_generic.PGOCAML_GENERIC.html#TYPEt">t</a> -><br> unit <a href="PGOCaml_generic.PGOCAML_GENERIC.html#TYPEmonad">monad</a></code></pre><div class="info"> Perform a COMMIT operation on the database.<br> </div> <pre><span class="keyword">val</span> <a name="VALrollback"></a>rollback : <code class="type">'a <a href="PGOCaml_generic.PGOCAML_GENERIC.html#TYPEt">t</a> -><br> unit <a href="PGOCaml_generic.PGOCAML_GENERIC.html#TYPEmonad">monad</a></code></pre><div class="info"> Perform a ROLLBACK operation on the database.<br> </div> <br> <a name="6_Serialcolumn"></a> <h6>Serial column</h6><br> <pre><span class="keyword">val</span> <a name="VALserial"></a>serial : <code class="type">'a <a href="PGOCaml_generic.PGOCAML_GENERIC.html#TYPEt">t</a> -><br> string -> int64 <a href="PGOCaml_generic.PGOCAML_GENERIC.html#TYPEmonad">monad</a></code></pre><div class="info"> This is a shorthand for <code class="code">SELECT CURRVAL(serial)</code>. For a table called <code class="code">table</code> with serial column <code class="code">id</code> you would typically call this as <code class="code">serial dbh "table_id_seq"</code> after the previous INSERT operation to get the serial number of the inserted row.<br> </div> <pre><span class="keyword">val</span> <a name="VALserial4"></a>serial4 : <code class="type">'a <a href="PGOCaml_generic.PGOCAML_GENERIC.html#TYPEt">t</a> -><br> string -> int32 <a href="PGOCaml_generic.PGOCAML_GENERIC.html#TYPEmonad">monad</a></code></pre><div class="info"> As <code class="code">PGOCaml.serial</code> but assumes that the column is a SERIAL or SERIAL4 type.<br> </div> <pre><span class="keyword">val</span> <a name="VALserial8"></a>serial8 : <code class="type">'a <a href="PGOCaml_generic.PGOCAML_GENERIC.html#TYPEt">t</a> -><br> string -> int64 <a href="PGOCaml_generic.PGOCAML_GENERIC.html#TYPEmonad">monad</a></code></pre><div class="info"> Same as <code class="code">PGOCaml.serial</code>.<br> </div> <br> <a name="6_Miscellaneous"></a> <h6>Miscellaneous</h6><br> <pre><span class="keyword">val</span> <a name="VALmax_message_length"></a>max_message_length : <code class="type">int Pervasives.ref</code></pre><div class="info"> Maximum message length accepted from the back-end. The default is <code class="code">Sys.max_string_length</code>, which means that we will try to read as much data from the back-end as we can, and this may cause us to run out of memory (particularly on 64 bit machines), causing a possible denial of service. You may want to set this to a smaller size to avoid this happening.<br> </div> <pre><span class="keyword">val</span> <a name="VALverbose"></a>verbose : <code class="type">int Pervasives.ref</code></pre><div class="info"> Verbosity. 0 means don't print anything. 1 means print short error messages as returned from the back-end. 2 means print all messages as returned from the back-end. Messages are printed on <code class="code">stderr</code>. Default verbosity level is 1.<br> </div> <pre><span class="keyword">val</span> <a name="VALset_private_data"></a>set_private_data : <code class="type">'a <a href="PGOCaml_generic.PGOCAML_GENERIC.html#TYPEt">t</a> -> 'a -> unit</code></pre><div class="info"> Attach some private data to the database handle. <p> NB. The pa_pgsql camlp4 extension uses this for its own purposes, which means that in most programs you will not be able to attach private data to the database handle.<br> </div> <pre><span class="keyword">val</span> <a name="VALprivate_data"></a>private_data : <code class="type">'a <a href="PGOCaml_generic.PGOCAML_GENERIC.html#TYPEt">t</a> -> 'a</code></pre><div class="info"> Retrieve some private data previously attached to the database handle. If no data has been attached, raises <code class="code">Not_found</code>. <p> NB. The pa_pgsql camlp4 extension uses this for its own purposes, which means that in most programs you will not be able to attach private data to the database handle.<br> </div> <pre><span class="keyword">type</span> <a name="TYPEpa_pg_data"></a><code class="type"></code>pa_pg_data = <code class="type">(string, bool) Hashtbl.t</code> </pre> <div class="info"> When using pa_pgsql, database handles have type <code class="code">PGOCaml.pa_pg_data PGOCaml.t</code><br> </div> <br> <a name="6_LowlevelqueryinterfaceDONOTUSEDIRECTLY"></a> <h6>Low level query interface - DO NOT USE DIRECTLY</h6><br> <pre><span class="keyword">type</span> <a name="TYPEoid"></a><code class="type"></code>oid = <code class="type">int32</code> </pre> <pre><span class="keyword">type</span> <a name="TYPEparam"></a><code class="type"></code>param = <code class="type">string option</code> </pre> <div class="info"> None is NULL.<br> </div> <pre><span class="keyword">type</span> <a name="TYPEresult"></a><code class="type"></code>result = <code class="type">string option</code> </pre> <div class="info"> None is NULL.<br> </div> <pre><span class="keyword">type</span> <a name="TYPErow"></a><code class="type"></code>row = <code class="type"><a href="PGOCaml_generic.PGOCAML_GENERIC.html#TYPEresult">result</a> list</code> </pre> <div class="info"> One row is a list of fields.<br> </div> <pre><span class="keyword">val</span> <a name="VALprepare"></a>prepare : <code class="type">'a <a href="PGOCaml_generic.PGOCAML_GENERIC.html#TYPEt">t</a> -><br> query:string -><br> ?name:string -><br> ?types:<a href="PGOCaml_generic.PGOCAML_GENERIC.html#TYPEoid">oid</a> list -><br> unit -> unit <a href="PGOCaml_generic.PGOCAML_GENERIC.html#TYPEmonad">monad</a></code></pre><div class="info"> <code class="code">prepare conn ~query ?name ?types ()</code> prepares the statement <code class="code">query</code> and optionally names it <code class="code">name</code> and sets the parameter types to <code class="code">types</code>. If no name is given, then the "unnamed" statement is overwritten. If no types are given, then the PostgreSQL engine infers types. Synchronously checks for errors.<br> </div> <pre><span class="keyword">val</span> <a name="VALexecute_rev"></a>execute_rev : <code class="type">'a <a href="PGOCaml_generic.PGOCAML_GENERIC.html#TYPEt">t</a> -><br> ?name:string -><br> ?portal:string -><br> params:<a href="PGOCaml_generic.PGOCAML_GENERIC.html#TYPEparam">param</a> list -><br> unit -><br> <a href="PGOCaml_generic.PGOCAML_GENERIC.html#TYPErow">row</a> list<br> <a href="PGOCaml_generic.PGOCAML_GENERIC.html#TYPEmonad">monad</a></code></pre><pre><span class="keyword">val</span> <a name="VALexecute"></a>execute : <code class="type">'a <a href="PGOCaml_generic.PGOCAML_GENERIC.html#TYPEt">t</a> -><br> ?name:string -><br> ?portal:string -><br> params:<a href="PGOCaml_generic.PGOCAML_GENERIC.html#TYPEparam">param</a> list -><br> unit -><br> <a href="PGOCaml_generic.PGOCAML_GENERIC.html#TYPErow">row</a> list<br> <a href="PGOCaml_generic.PGOCAML_GENERIC.html#TYPEmonad">monad</a></code></pre><div class="info"> <code class="code">execute conn ?name ~params ()</code> executes the named or unnamed statement <code class="code">name</code>, with the given parameters <code class="code">params</code>, returning the result rows (if any). <p> There are several steps involved at the protocol layer: (1) a "portal" is created from the statement, binding the parameters in the statement (Bind). (2) the portal is executed (Execute). (3) we synchronise the connection (Sync). <p> The optional <code class="code">?portal</code> parameter may be used to name the portal created in step (1) above (otherwise the unnamed portal is used). This is only important if you want to call <code class="code">PGOCaml.describe_portal</code> to find out the result types.<br> </div> <pre><span class="keyword">val</span> <a name="VALclose_statement"></a>close_statement : <code class="type">'a <a href="PGOCaml_generic.PGOCAML_GENERIC.html#TYPEt">t</a> -><br> ?name:string -> unit -> unit <a href="PGOCaml_generic.PGOCAML_GENERIC.html#TYPEmonad">monad</a></code></pre><div class="info"> <code class="code">close_statement conn ?name ()</code> closes a prepared statement and frees up any resources.<br> </div> <pre><span class="keyword">val</span> <a name="VALclose_portal"></a>close_portal : <code class="type">'a <a href="PGOCaml_generic.PGOCAML_GENERIC.html#TYPEt">t</a> -><br> ?portal:string -> unit -> unit <a href="PGOCaml_generic.PGOCAML_GENERIC.html#TYPEmonad">monad</a></code></pre><div class="info"> <code class="code">close_portal conn ?portal ()</code> closes a portal and frees up any resources.<br> </div> <pre><span class="keyword">type</span> <a name="TYPErow_description"></a><code class="type"></code>row_description = <code class="type"><a href="PGOCaml_generic.PGOCAML_GENERIC.html#TYPEresult_description">result_description</a> list</code> </pre> <br><code><span class="keyword">type</span> <a name="TYPEresult_description"></a><code class="type"></code>result_description = {</code><table class="typetable"> <tr> <td align="left" valign="top" > <code> </code></td> <td align="left" valign="top" > <code>name : <code class="type">string</code>;</code></td> <td class="typefieldcomment" align="left" valign="top" ><code>(*</code></td><td class="typefieldcomment" align="left" valign="top" >Field name.</td><td class="typefieldcomment" align="left" valign="bottom" ><code>*)</code></td> </tr> <tr> <td align="left" valign="top" > <code> </code></td> <td align="left" valign="top" > <code>table : <code class="type"><a href="PGOCaml_generic.PGOCAML_GENERIC.html#TYPEoid">oid</a> option</code>;</code></td> <td class="typefieldcomment" align="left" valign="top" ><code>(*</code></td><td class="typefieldcomment" align="left" valign="top" >OID of table.</td><td class="typefieldcomment" align="left" valign="bottom" ><code>*)</code></td> </tr> <tr> <td align="left" valign="top" > <code> </code></td> <td align="left" valign="top" > <code>column : <code class="type">int option</code>;</code></td> <td class="typefieldcomment" align="left" valign="top" ><code>(*</code></td><td class="typefieldcomment" align="left" valign="top" >Column number of field in table.</td><td class="typefieldcomment" align="left" valign="bottom" ><code>*)</code></td> </tr> <tr> <td align="left" valign="top" > <code> </code></td> <td align="left" valign="top" > <code>field_type : <code class="type"><a href="PGOCaml_generic.PGOCAML_GENERIC.html#TYPEoid">oid</a></code>;</code></td> <td class="typefieldcomment" align="left" valign="top" ><code>(*</code></td><td class="typefieldcomment" align="left" valign="top" >The type of the field.</td><td class="typefieldcomment" align="left" valign="bottom" ><code>*)</code></td> </tr> <tr> <td align="left" valign="top" > <code> </code></td> <td align="left" valign="top" > <code>length : <code class="type">int</code>;</code></td> <td class="typefieldcomment" align="left" valign="top" ><code>(*</code></td><td class="typefieldcomment" align="left" valign="top" >Length of the field.</td><td class="typefieldcomment" align="left" valign="bottom" ><code>*)</code></td> </tr> <tr> <td align="left" valign="top" > <code> </code></td> <td align="left" valign="top" > <code>modifier : <code class="type">int32</code>;</code></td> <td class="typefieldcomment" align="left" valign="top" ><code>(*</code></td><td class="typefieldcomment" align="left" valign="top" >Type modifier.</td><td class="typefieldcomment" align="left" valign="bottom" ><code>*)</code></td> </tr></table> } <pre><span class="keyword">type</span> <a name="TYPEparams_description"></a><code class="type"></code>params_description = <code class="type"><a href="PGOCaml_generic.PGOCAML_GENERIC.html#TYPEparam_description">param_description</a> list</code> </pre> <br><code><span class="keyword">type</span> <a name="TYPEparam_description"></a><code class="type"></code>param_description = {</code><table class="typetable"> <tr> <td align="left" valign="top" > <code> </code></td> <td align="left" valign="top" > <code>param_type : <code class="type"><a href="PGOCaml_generic.PGOCAML_GENERIC.html#TYPEoid">oid</a></code>;</code></td> <td class="typefieldcomment" align="left" valign="top" ><code>(*</code></td><td class="typefieldcomment" align="left" valign="top" >The type of the parameter.</td><td class="typefieldcomment" align="left" valign="bottom" ><code>*)</code></td> </tr></table> } <pre><span class="keyword">val</span> <a name="VALdescribe_statement"></a>describe_statement : <code class="type">'a <a href="PGOCaml_generic.PGOCAML_GENERIC.html#TYPEt">t</a> -><br> ?name:string -><br> unit -><br> (<a href="PGOCaml_generic.PGOCAML_GENERIC.html#TYPEparams_description">params_description</a> *<br> <a href="PGOCaml_generic.PGOCAML_GENERIC.html#TYPErow_description">row_description</a> option)<br> <a href="PGOCaml_generic.PGOCAML_GENERIC.html#TYPEmonad">monad</a></code></pre><div class="info"> <code class="code">describe_statement conn ?name ()</code> describes the named or unnamed statement's parameter types and result types.<br> </div> <pre><span class="keyword">val</span> <a name="VALdescribe_portal"></a>describe_portal : <code class="type">'a <a href="PGOCaml_generic.PGOCAML_GENERIC.html#TYPEt">t</a> -><br> ?portal:string -><br> unit -><br> <a href="PGOCaml_generic.PGOCAML_GENERIC.html#TYPErow_description">row_description</a> option<br> <a href="PGOCaml_generic.PGOCAML_GENERIC.html#TYPEmonad">monad</a></code></pre><div class="info"> <code class="code">describe_portal conn ?portal ()</code> describes the named or unnamed portal's result types.<br> </div> <br> <a name="6_LowleveltypeconversionfunctionsDONOTUSEDIRECTLY"></a> <h6>Low level type conversion functions - DO NOT USE DIRECTLY</h6><br> <pre><span class="keyword">val</span> <a name="VALname_of_type"></a>name_of_type : <code class="type">?modifier:int32 -> <a href="PGOCaml_generic.PGOCAML_GENERIC.html#TYPEoid">oid</a> -> string</code></pre><div class="info"> Returns the OCaml equivalent type name to the PostgreSQL type <code class="code">oid</code>. For instance, <code class="code">name_of_type (Int32.of_int 23)</code> returns <code class="code">"int32"</code> because the OID for PostgreSQL's internal <code class="code">int4</code> type is <code class="code">23</code>. As another example, <code class="code">name_of_type (Int32.of_int 25)</code> returns <code class="code">"string"</code>.<br> </div> <pre><span class="keyword">type</span> <a name="TYPEtimestamptz"></a><code class="type"></code>timestamptz = <code class="type">CalendarLib.Calendar.t * CalendarLib.Time_Zone.t</code> </pre> <pre><span class="keyword">type</span> <a name="TYPEint16"></a><code class="type"></code>int16 = <code class="type">int</code> </pre> <pre><span class="keyword">type</span> <a name="TYPEbytea"></a><code class="type"></code>bytea = <code class="type">string</code> </pre> <pre><span class="keyword">type</span> <a name="TYPEpoint"></a><code class="type"></code>point = <code class="type">float * float</code> </pre> <pre><span class="keyword">type</span> <a name="TYPEint32_array"></a><code class="type"></code>int32_array = <code class="type">int32 array</code> </pre> <pre><span class="keyword">val</span> <a name="VALstring_of_oid"></a>string_of_oid : <code class="type"><a href="PGOCaml_generic.PGOCAML_GENERIC.html#TYPEoid">oid</a> -> string</code></pre><pre><span class="keyword">val</span> <a name="VALstring_of_bool"></a>string_of_bool : <code class="type">bool -> string</code></pre><pre><span class="keyword">val</span> <a name="VALstring_of_int"></a>string_of_int : <code class="type">int -> string</code></pre><pre><span class="keyword">val</span> <a name="VALstring_of_int16"></a>string_of_int16 : <code class="type"><a href="PGOCaml_generic.PGOCAML_GENERIC.html#TYPEint16">int16</a> -> string</code></pre><pre><span class="keyword">val</span> <a name="VALstring_of_int32"></a>string_of_int32 : <code class="type">int32 -> string</code></pre><pre><span class="keyword">val</span> <a name="VALstring_of_int64"></a>string_of_int64 : <code class="type">int64 -> string</code></pre><pre><span class="keyword">val</span> <a name="VALstring_of_float"></a>string_of_float : <code class="type">float -> string</code></pre><pre><span class="keyword">val</span> <a name="VALstring_of_point"></a>string_of_point : <code class="type"><a href="PGOCaml_generic.PGOCAML_GENERIC.html#TYPEpoint">point</a> -> string</code></pre><pre><span class="keyword">val</span> <a name="VALstring_of_timestamp"></a>string_of_timestamp : <code class="type">CalendarLib.Calendar.t -> string</code></pre><pre><span class="keyword">val</span> <a name="VALstring_of_timestamptz"></a>string_of_timestamptz : <code class="type"><a href="PGOCaml_generic.PGOCAML_GENERIC.html#TYPEtimestamptz">timestamptz</a> -> string</code></pre><pre><span class="keyword">val</span> <a name="VALstring_of_date"></a>string_of_date : <code class="type">CalendarLib.Date.t -> string</code></pre><pre><span class="keyword">val</span> <a name="VALstring_of_time"></a>string_of_time : <code class="type">CalendarLib.Time.t -> string</code></pre><pre><span class="keyword">val</span> <a name="VALstring_of_interval"></a>string_of_interval : <code class="type">CalendarLib.Calendar.Period.t -> string</code></pre><pre><span class="keyword">val</span> <a name="VALstring_of_int32_array"></a>string_of_int32_array : <code class="type"><a href="PGOCaml_generic.PGOCAML_GENERIC.html#TYPEint32_array">int32_array</a> -> string</code></pre><pre><span class="keyword">val</span> <a name="VALstring_of_bytea"></a>string_of_bytea : <code class="type"><a href="PGOCaml_generic.PGOCAML_GENERIC.html#TYPEbytea">bytea</a> -> string</code></pre><pre><span class="keyword">val</span> <a name="VALstring_of_string"></a>string_of_string : <code class="type">string -> string</code></pre><pre><span class="keyword">val</span> <a name="VALstring_of_unit"></a>string_of_unit : <code class="type">unit -> string</code></pre><pre><span class="keyword">val</span> <a name="VALbool_of_string"></a>bool_of_string : <code class="type">string -> bool</code></pre><pre><span class="keyword">val</span> <a name="VALint_of_string"></a>int_of_string : <code class="type">string -> int</code></pre><pre><span class="keyword">val</span> <a name="VALint16_of_string"></a>int16_of_string : <code class="type">string -> <a href="PGOCaml_generic.PGOCAML_GENERIC.html#TYPEint16">int16</a></code></pre><pre><span class="keyword">val</span> <a name="VALint32_of_string"></a>int32_of_string : <code class="type">string -> int32</code></pre><pre><span class="keyword">val</span> <a name="VALint64_of_string"></a>int64_of_string : <code class="type">string -> int64</code></pre><pre><span class="keyword">val</span> <a name="VALfloat_of_string"></a>float_of_string : <code class="type">string -> float</code></pre><pre><span class="keyword">val</span> <a name="VALpoint_of_string"></a>point_of_string : <code class="type">string -> <a href="PGOCaml_generic.PGOCAML_GENERIC.html#TYPEpoint">point</a></code></pre><pre><span class="keyword">val</span> <a name="VALtimestamp_of_string"></a>timestamp_of_string : <code class="type">string -> CalendarLib.Calendar.t</code></pre><pre><span class="keyword">val</span> <a name="VALtimestamptz_of_string"></a>timestamptz_of_string : <code class="type">string -> <a href="PGOCaml_generic.PGOCAML_GENERIC.html#TYPEtimestamptz">timestamptz</a></code></pre><pre><span class="keyword">val</span> <a name="VALdate_of_string"></a>date_of_string : <code class="type">string -> CalendarLib.Date.t</code></pre><pre><span class="keyword">val</span> <a name="VALtime_of_string"></a>time_of_string : <code class="type">string -> CalendarLib.Time.t</code></pre><pre><span class="keyword">val</span> <a name="VALinterval_of_string"></a>interval_of_string : <code class="type">string -> CalendarLib.Calendar.Period.t</code></pre><pre><span class="keyword">val</span> <a name="VALint32_array_of_string"></a>int32_array_of_string : <code class="type">string -> <a href="PGOCaml_generic.PGOCAML_GENERIC.html#TYPEint32_array">int32_array</a></code></pre><pre><span class="keyword">val</span> <a name="VALbytea_of_string"></a>bytea_of_string : <code class="type">string -> <a href="PGOCaml_generic.PGOCAML_GENERIC.html#TYPEbytea">bytea</a></code></pre><pre><span class="keyword">val</span> <a name="VALunit_of_string"></a>unit_of_string : <code class="type">string -> unit</code></pre><div class="info"> These conversion functions are used by pa_pgsql to convert values in and out of the database.<br> </div> <pre><span class="keyword">val</span> <a name="VALbind"></a>bind : <code class="type">'a <a href="PGOCaml_generic.PGOCAML_GENERIC.html#TYPEmonad">monad</a> -><br> ('a -> 'b <a href="PGOCaml_generic.PGOCAML_GENERIC.html#TYPEmonad">monad</a>) -><br> 'b <a href="PGOCaml_generic.PGOCAML_GENERIC.html#TYPEmonad">monad</a></code></pre><pre><span class="keyword">val</span> <a name="VALreturn"></a>return : <code class="type">'a -> 'a <a href="PGOCaml_generic.PGOCAML_GENERIC.html#TYPEmonad">monad</a></code></pre></body></html>