/usr/share/doc/libpgocaml-ocaml-dev/html/api/PGOCaml_generic.PGOCAML_GENERIC.html is in libpgocaml-ocaml-dev 2.2-1+b2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 | <!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="previous" href="PGOCaml_generic.THREAD.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_aux" rel="Chapter" href="PGOCaml_aux.html">
<link title="PGOCaml_config" rel="Chapter" href="PGOCaml_config.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.PGOCAML_GENERIC</title>
</head>
<body>
<div class="navbar"><a class="pre" href="PGOCaml_generic.THREAD.html" title="PGOCaml_generic.THREAD">Previous</a>
<a class="up" href="PGOCaml_generic.html" title="PGOCaml_generic">Up</a>
</div>
<h1>Module type <a href="type_PGOCaml_generic.PGOCAML_GENERIC.html">PGOCaml_generic.PGOCAML_GENERIC</a></h1>
<pre><span class="keyword">module type</span> PGOCAML_GENERIC = <code class="code">sig</code> <a href="PGOCaml_generic.PGOCAML_GENERIC.html">..</a> <code class="code">end</code></pre><hr width="100%">
<pre><span id="TYPEt"><span class="keyword">type</span> <code class="type">'a</code> t</span> </pre>
<div class="info ">
Database handle.<br>
</div>
<pre><span id="TYPEmonad"><span class="keyword">type</span> <code class="type">'a</code> monad</span> </pre>
<pre><span id="TYPEisolation"><span class="keyword">type</span> <code class="type"></code>isolation</span> = <code class="type">[ `Read_committed | `Read_uncommitted | `Repeatable_read | `Serializable ]</code> </pre>
<pre><span id="TYPEaccess"><span class="keyword">type</span> <code class="type"></code>access</span> = <code class="type">[ `Read_only | `Read_write ]</code> </pre>
<pre><span id="EXCEPTIONError"><span class="keyword">exception</span> Error</span> <span class="keyword">of</span> <code class="type">string</code></pre>
<div class="info ">
For library errors.<br>
</div>
<pre><span id="EXCEPTIONPostgreSQL_Error"><span class="keyword">exception</span> PostgreSQL_Error</span> <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>
<h6 id="6_Connectionmanagement">Connection management</h6><br>
<pre><span id="VALconnect"><span class="keyword">val</span> connect</span> : <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 id="VALclose"><span class="keyword">val</span> close</span> : <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 id="VALping"><span class="keyword">val</span> ping</span> : <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>
<pre><span id="VALalive"><span class="keyword">val</span> alive</span> : <code class="type">'a <a href="PGOCaml_generic.PGOCAML_GENERIC.html#TYPEt">t</a> -><br> bool <a href="PGOCaml_generic.PGOCAML_GENERIC.html#TYPEmonad">monad</a></code></pre><div class="info ">
This function is a wrapper of <code class="code">ping</code> that returns a boolean instead of
raising an exception.<br>
</div>
<br>
<h6 id="6_Transactions">Transactions</h6><br>
<pre><span id="VALbegin_work"><span class="keyword">val</span> begin_work</span> : <code class="type">?isolation:<a href="PGOCaml_generic.PGOCAML_GENERIC.html#TYPEisolation">isolation</a> -><br> ?access:<a href="PGOCaml_generic.PGOCAML_GENERIC.html#TYPEaccess">access</a> -><br> ?deferrable:bool -><br> '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 id="VALcommit"><span class="keyword">val</span> commit</span> : <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 id="VALrollback"><span class="keyword">val</span> rollback</span> : <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>
<pre><span id="VALtransact"><span class="keyword">val</span> transact</span> : <code class="type">'a <a href="PGOCaml_generic.PGOCAML_GENERIC.html#TYPEt">t</a> -><br> ?isolation:<a href="PGOCaml_generic.PGOCAML_GENERIC.html#TYPEisolation">isolation</a> -><br> ?access:<a href="PGOCaml_generic.PGOCAML_GENERIC.html#TYPEaccess">access</a> -><br> ?deferrable:bool -><br> ('a <a href="PGOCaml_generic.PGOCAML_GENERIC.html#TYPEt">t</a> -><br> '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><div class="info ">
<code class="code">transact db ?isolation ?access ?deferrable f</code> wraps your
function <code class="code">f</code> inside a transactional block.
First it calls <code class="code">begin_work</code> with <code class="code">isolation</code>, <code class="code">access</code> and <code class="code">deferrable</code>,
then calls <code class="code">f</code> and do <code class="code">rollback</code> if <code class="code">f</code> raises
an exception, <code class="code">commit</code> otherwise.<br>
</div>
<br>
<h6 id="6_Serialcolumn">Serial column</h6><br>
<pre><span id="VALserial"><span class="keyword">val</span> serial</span> : <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 id="VALserial4"><span class="keyword">val</span> serial4</span> : <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 <a href="PGOCaml_generic.PGOCAML_GENERIC.html#VALserial"><code class="code">PGOCaml_generic.PGOCAML_GENERIC.serial</code></a> but assumes that the column is a SERIAL or
SERIAL4 type.<br>
</div>
<pre><span id="VALserial8"><span class="keyword">val</span> serial8</span> : <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 <a href="PGOCaml_generic.PGOCAML_GENERIC.html#VALserial"><code class="code">PGOCaml_generic.PGOCAML_GENERIC.serial</code></a>.<br>
</div>
<br>
<h6 id="6_Miscellaneous">Miscellaneous</h6><br>
<pre><span id="VALmax_message_length"><span class="keyword">val</span> max_message_length</span> : <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 id="VALverbose"><span class="keyword">val</span> verbose</span> : <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 id="VALset_private_data"><span class="keyword">val</span> set_private_data</span> : <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 id="VALprivate_data"><span class="keyword">val</span> private_data</span> : <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 id="VALuuid"><span class="keyword">val</span> uuid</span> : <code class="type">'a <a href="PGOCaml_generic.PGOCAML_GENERIC.html#TYPEt">t</a> -> string</code></pre><div class="info ">
Retrieve the unique identifier for this connection.<br>
</div>
<pre><span id="TYPEpa_pg_data"><span class="keyword">type</span> <code class="type"></code>pa_pg_data</span> = <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>
<h6 id="6_LowlevelqueryinterfaceDONOTUSEDIRECTLY">Low level query interface - DO NOT USE DIRECTLY</h6><br>
<pre><span id="TYPEoid"><span class="keyword">type</span> <code class="type"></code>oid</span> = <code class="type">int32</code> </pre>
<pre><span id="TYPEparam"><span class="keyword">type</span> <code class="type"></code>param</span> = <code class="type">string option</code> </pre>
<div class="info ">
None is NULL.<br>
</div>
<pre><span id="TYPEresult"><span class="keyword">type</span> <code class="type"></code>result</span> = <code class="type">string option</code> </pre>
<div class="info ">
None is NULL.<br>
</div>
<pre><span id="TYPErow"><span class="keyword">type</span> <code class="type"></code>row</span> = <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 id="VALprepare"><span class="keyword">val</span> prepare</span> : <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 id="VALexecute_rev"><span class="keyword">val</span> execute_rev</span> : <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 id="VALexecute"><span class="keyword">val</span> execute</span> : <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 <a href="PGOCaml_generic.PGOCAML_GENERIC.html#VALdescribe_portal"><code class="code">PGOCaml_generic.PGOCAML_GENERIC.describe_portal</code></a>
to find out the result types.<br>
</div>
<pre><span id="VALcursor"><span class="keyword">val</span> cursor</span> : <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> (<a href="PGOCaml_generic.PGOCAML_GENERIC.html#TYPErow">row</a> -><br> unit <a href="PGOCaml_generic.PGOCAML_GENERIC.html#TYPEmonad">monad</a>) -><br> unit <a href="PGOCaml_generic.PGOCAML_GENERIC.html#TYPEmonad">monad</a></code></pre>
<pre><span id="VALclose_statement"><span class="keyword">val</span> close_statement</span> : <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 id="VALclose_portal"><span class="keyword">val</span> close_portal</span> : <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 id="VALinject"><span class="keyword">val</span> inject</span> : <code class="type">'a <a href="PGOCaml_generic.PGOCAML_GENERIC.html#TYPEt">t</a> -><br> ?name:string -><br> string -><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">inject conn ?name query</code> executes the statement <code class="code">query</code>
and optionally names it <code class="code">name</code> and gives the result.<br>
</div>
<pre><span id="VALalter"><span class="keyword">val</span> alter</span> : <code class="type">'a <a href="PGOCaml_generic.PGOCAML_GENERIC.html#TYPEt">t</a> -><br> ?name:string -> string -> unit <a href="PGOCaml_generic.PGOCAML_GENERIC.html#TYPEmonad">monad</a></code></pre><div class="info ">
<code class="code">alter conn ?name query</code> executes the statement <code class="code">query</code>
and optionally names it <code class="code">name</code>. Same as inject but ignoring the result.<br>
</div>
<pre><span id="TYPErow_description"><span class="keyword">type</span> <code class="type"></code>row_description</span> = <code class="type"><a href="PGOCaml_generic.PGOCAML_GENERIC.html#TYPEresult_description">result_description</a> list</code> </pre>
<pre><code><span id="TYPEresult_description"><span class="keyword">type</span> <code class="type"></code>result_description</span> = {</code></pre><table class="typetable">
<tr>
<td align="left" valign="top" >
<code> </code></td>
<td align="left" valign="top" >
<code><span id="TYPEELTresult_description.name">name</span> : <code class="type">string</code>;</code></td>
<td class="typefieldcomment" align="left" valign="top" ><code>(*</code></td><td class="typefieldcomment" align="left" valign="top" ><div class="info ">
Field name.<br>
</div>
</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><span id="TYPEELTresult_description.table">table</span> : <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" ><div class="info ">
OID of table.<br>
</div>
</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><span id="TYPEELTresult_description.column">column</span> : <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" ><div class="info ">
Column number of field in table.<br>
</div>
</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><span id="TYPEELTresult_description.field_type">field_type</span> : <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" ><div class="info ">
The type of the field.<br>
</div>
</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><span id="TYPEELTresult_description.length">length</span> : <code class="type">int</code>;</code></td>
<td class="typefieldcomment" align="left" valign="top" ><code>(*</code></td><td class="typefieldcomment" align="left" valign="top" ><div class="info ">
Length of the field.<br>
</div>
</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><span id="TYPEELTresult_description.modifier">modifier</span> : <code class="type">int32</code>;</code></td>
<td class="typefieldcomment" align="left" valign="top" ><code>(*</code></td><td class="typefieldcomment" align="left" valign="top" ><div class="info ">
Type modifier.<br>
</div>
</td><td class="typefieldcomment" align="left" valign="bottom" ><code>*)</code></td>
</tr></table>
}
<pre><span id="TYPEparams_description"><span class="keyword">type</span> <code class="type"></code>params_description</span> = <code class="type"><a href="PGOCaml_generic.PGOCAML_GENERIC.html#TYPEparam_description">param_description</a> list</code> </pre>
<pre><code><span id="TYPEparam_description"><span class="keyword">type</span> <code class="type"></code>param_description</span> = {</code></pre><table class="typetable">
<tr>
<td align="left" valign="top" >
<code> </code></td>
<td align="left" valign="top" >
<code><span id="TYPEELTparam_description.param_type">param_type</span> : <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" ><div class="info ">
The type of the parameter.<br>
</div>
</td><td class="typefieldcomment" align="left" valign="bottom" ><code>*)</code></td>
</tr></table>
}
<pre><span id="VALdescribe_statement"><span class="keyword">val</span> describe_statement</span> : <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 id="VALdescribe_portal"><span class="keyword">val</span> describe_portal</span> : <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>
<h6 id="6_LowleveltypeconversionfunctionsDONOTUSEDIRECTLY">Low level type conversion functions - DO NOT USE DIRECTLY</h6><br>
<pre><span id="VALname_of_type"><span class="keyword">val</span> name_of_type</span> : <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 id="TYPEinet"><span class="keyword">type</span> <code class="type"></code>inet</span> = <code class="type">Unix.inet_addr * int</code> </pre>
<pre><span id="TYPEtimestamptz"><span class="keyword">type</span> <code class="type"></code>timestamptz</span> = <code class="type">CalendarLib.Calendar.t * CalendarLib.Time_Zone.t</code> </pre>
<pre><span id="TYPEint16"><span class="keyword">type</span> <code class="type"></code>int16</span> = <code class="type">int</code> </pre>
<pre><span id="TYPEbytea"><span class="keyword">type</span> <code class="type"></code>bytea</span> = <code class="type">string</code> </pre>
<pre><span id="TYPEpoint"><span class="keyword">type</span> <code class="type"></code>point</span> = <code class="type">float * float</code> </pre>
<pre><span id="TYPEhstore"><span class="keyword">type</span> <code class="type"></code>hstore</span> = <code class="type">(string * string option) list</code> </pre>
<pre><span id="TYPEnumeric"><span class="keyword">type</span> <code class="type"></code>numeric</span> = <code class="type">string</code> </pre>
<pre><span id="TYPEbool_array"><span class="keyword">type</span> <code class="type"></code>bool_array</span> = <code class="type">bool option list</code> </pre>
<pre><span id="TYPEint32_array"><span class="keyword">type</span> <code class="type"></code>int32_array</span> = <code class="type">int32 option list</code> </pre>
<pre><span id="TYPEint64_array"><span class="keyword">type</span> <code class="type"></code>int64_array</span> = <code class="type">int64 option list</code> </pre>
<pre><span id="TYPEstring_array"><span class="keyword">type</span> <code class="type"></code>string_array</span> = <code class="type">string option list</code> </pre>
<pre><span id="TYPEfloat_array"><span class="keyword">type</span> <code class="type"></code>float_array</span> = <code class="type">float option list</code> </pre>
<br>
The following conversion functions are used by pa_pgsql to convert
values in and out of the database.<br>
<pre><span id="VALstring_of_oid"><span class="keyword">val</span> string_of_oid</span> : <code class="type"><a href="PGOCaml_generic.PGOCAML_GENERIC.html#TYPEoid">oid</a> -> string</code></pre>
<pre><span id="VALstring_of_bool"><span class="keyword">val</span> string_of_bool</span> : <code class="type">bool -> string</code></pre>
<pre><span id="VALstring_of_int"><span class="keyword">val</span> string_of_int</span> : <code class="type">int -> string</code></pre>
<pre><span id="VALstring_of_int16"><span class="keyword">val</span> string_of_int16</span> : <code class="type"><a href="PGOCaml_generic.PGOCAML_GENERIC.html#TYPEint16">int16</a> -> string</code></pre>
<pre><span id="VALstring_of_int32"><span class="keyword">val</span> string_of_int32</span> : <code class="type">int32 -> string</code></pre>
<pre><span id="VALstring_of_int64"><span class="keyword">val</span> string_of_int64</span> : <code class="type">int64 -> string</code></pre>
<pre><span id="VALstring_of_float"><span class="keyword">val</span> string_of_float</span> : <code class="type">float -> string</code></pre>
<pre><span id="VALstring_of_point"><span class="keyword">val</span> string_of_point</span> : <code class="type"><a href="PGOCaml_generic.PGOCAML_GENERIC.html#TYPEpoint">point</a> -> string</code></pre>
<pre><span id="VALstring_of_hstore"><span class="keyword">val</span> string_of_hstore</span> : <code class="type"><a href="PGOCaml_generic.PGOCAML_GENERIC.html#TYPEhstore">hstore</a> -> string</code></pre>
<pre><span id="VALstring_of_numeric"><span class="keyword">val</span> string_of_numeric</span> : <code class="type"><a href="PGOCaml_generic.PGOCAML_GENERIC.html#TYPEnumeric">numeric</a> -> string</code></pre>
<pre><span id="VALstring_of_inet"><span class="keyword">val</span> string_of_inet</span> : <code class="type"><a href="PGOCaml_generic.PGOCAML_GENERIC.html#TYPEinet">inet</a> -> string</code></pre>
<pre><span id="VALstring_of_timestamp"><span class="keyword">val</span> string_of_timestamp</span> : <code class="type">CalendarLib.Calendar.t -> string</code></pre>
<pre><span id="VALstring_of_timestamptz"><span class="keyword">val</span> string_of_timestamptz</span> : <code class="type"><a href="PGOCaml_generic.PGOCAML_GENERIC.html#TYPEtimestamptz">timestamptz</a> -> string</code></pre>
<pre><span id="VALstring_of_date"><span class="keyword">val</span> string_of_date</span> : <code class="type">CalendarLib.Date.t -> string</code></pre>
<pre><span id="VALstring_of_time"><span class="keyword">val</span> string_of_time</span> : <code class="type">CalendarLib.Time.t -> string</code></pre>
<pre><span id="VALstring_of_interval"><span class="keyword">val</span> string_of_interval</span> : <code class="type">CalendarLib.Calendar.Period.t -> string</code></pre>
<pre><span id="VALstring_of_bytea"><span class="keyword">val</span> string_of_bytea</span> : <code class="type"><a href="PGOCaml_generic.PGOCAML_GENERIC.html#TYPEbytea">bytea</a> -> string</code></pre>
<pre><span id="VALstring_of_string"><span class="keyword">val</span> string_of_string</span> : <code class="type">string -> string</code></pre>
<pre><span id="VALstring_of_unit"><span class="keyword">val</span> string_of_unit</span> : <code class="type">unit -> string</code></pre>
<pre><span id="VALstring_of_bool_array"><span class="keyword">val</span> string_of_bool_array</span> : <code class="type"><a href="PGOCaml_generic.PGOCAML_GENERIC.html#TYPEbool_array">bool_array</a> -> string</code></pre>
<pre><span id="VALstring_of_int32_array"><span class="keyword">val</span> string_of_int32_array</span> : <code class="type"><a href="PGOCaml_generic.PGOCAML_GENERIC.html#TYPEint32_array">int32_array</a> -> string</code></pre>
<pre><span id="VALstring_of_int64_array"><span class="keyword">val</span> string_of_int64_array</span> : <code class="type"><a href="PGOCaml_generic.PGOCAML_GENERIC.html#TYPEint64_array">int64_array</a> -> string</code></pre>
<pre><span id="VALstring_of_string_array"><span class="keyword">val</span> string_of_string_array</span> : <code class="type"><a href="PGOCaml_generic.PGOCAML_GENERIC.html#TYPEstring_array">string_array</a> -> string</code></pre>
<pre><span id="VALstring_of_float_array"><span class="keyword">val</span> string_of_float_array</span> : <code class="type"><a href="PGOCaml_generic.PGOCAML_GENERIC.html#TYPEfloat_array">float_array</a> -> string</code></pre>
<pre><span id="VALoid_of_string"><span class="keyword">val</span> oid_of_string</span> : <code class="type">string -> <a href="PGOCaml_generic.PGOCAML_GENERIC.html#TYPEoid">oid</a></code></pre>
<pre><span id="VALbool_of_string"><span class="keyword">val</span> bool_of_string</span> : <code class="type">string -> bool</code></pre>
<pre><span id="VALint_of_string"><span class="keyword">val</span> int_of_string</span> : <code class="type">string -> int</code></pre>
<pre><span id="VALint16_of_string"><span class="keyword">val</span> int16_of_string</span> : <code class="type">string -> <a href="PGOCaml_generic.PGOCAML_GENERIC.html#TYPEint16">int16</a></code></pre>
<pre><span id="VALint32_of_string"><span class="keyword">val</span> int32_of_string</span> : <code class="type">string -> int32</code></pre>
<pre><span id="VALint64_of_string"><span class="keyword">val</span> int64_of_string</span> : <code class="type">string -> int64</code></pre>
<pre><span id="VALfloat_of_string"><span class="keyword">val</span> float_of_string</span> : <code class="type">string -> float</code></pre>
<pre><span id="VALpoint_of_string"><span class="keyword">val</span> point_of_string</span> : <code class="type">string -> <a href="PGOCaml_generic.PGOCAML_GENERIC.html#TYPEpoint">point</a></code></pre>
<pre><span id="VALhstore_of_string"><span class="keyword">val</span> hstore_of_string</span> : <code class="type">string -> <a href="PGOCaml_generic.PGOCAML_GENERIC.html#TYPEhstore">hstore</a></code></pre>
<pre><span id="VALnumeric_of_string"><span class="keyword">val</span> numeric_of_string</span> : <code class="type">string -> <a href="PGOCaml_generic.PGOCAML_GENERIC.html#TYPEnumeric">numeric</a></code></pre>
<pre><span id="VALinet_of_string"><span class="keyword">val</span> inet_of_string</span> : <code class="type">string -> <a href="PGOCaml_generic.PGOCAML_GENERIC.html#TYPEinet">inet</a></code></pre>
<pre><span id="VALtimestamp_of_string"><span class="keyword">val</span> timestamp_of_string</span> : <code class="type">string -> CalendarLib.Calendar.t</code></pre>
<pre><span id="VALtimestamptz_of_string"><span class="keyword">val</span> timestamptz_of_string</span> : <code class="type">string -> <a href="PGOCaml_generic.PGOCAML_GENERIC.html#TYPEtimestamptz">timestamptz</a></code></pre>
<pre><span id="VALdate_of_string"><span class="keyword">val</span> date_of_string</span> : <code class="type">string -> CalendarLib.Date.t</code></pre>
<pre><span id="VALtime_of_string"><span class="keyword">val</span> time_of_string</span> : <code class="type">string -> CalendarLib.Time.t</code></pre>
<pre><span id="VALinterval_of_string"><span class="keyword">val</span> interval_of_string</span> : <code class="type">string -> CalendarLib.Calendar.Period.t</code></pre>
<pre><span id="VALbytea_of_string"><span class="keyword">val</span> bytea_of_string</span> : <code class="type">string -> <a href="PGOCaml_generic.PGOCAML_GENERIC.html#TYPEbytea">bytea</a></code></pre>
<pre><span id="VALunit_of_string"><span class="keyword">val</span> unit_of_string</span> : <code class="type">string -> unit</code></pre>
<pre><span id="VALbool_array_of_string"><span class="keyword">val</span> bool_array_of_string</span> : <code class="type">string -> <a href="PGOCaml_generic.PGOCAML_GENERIC.html#TYPEbool_array">bool_array</a></code></pre>
<pre><span id="VALint32_array_of_string"><span class="keyword">val</span> int32_array_of_string</span> : <code class="type">string -> <a href="PGOCaml_generic.PGOCAML_GENERIC.html#TYPEint32_array">int32_array</a></code></pre>
<pre><span id="VALint64_array_of_string"><span class="keyword">val</span> int64_array_of_string</span> : <code class="type">string -> <a href="PGOCaml_generic.PGOCAML_GENERIC.html#TYPEint64_array">int64_array</a></code></pre>
<pre><span id="VALstring_array_of_string"><span class="keyword">val</span> string_array_of_string</span> : <code class="type">string -> <a href="PGOCaml_generic.PGOCAML_GENERIC.html#TYPEstring_array">string_array</a></code></pre>
<pre><span id="VALfloat_array_of_string"><span class="keyword">val</span> float_array_of_string</span> : <code class="type">string -> <a href="PGOCaml_generic.PGOCAML_GENERIC.html#TYPEfloat_array">float_array</a></code></pre>
<pre><span id="VALbind"><span class="keyword">val</span> bind</span> : <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 id="VALreturn"><span class="keyword">val</span> return</span> : <code class="type">'a -> 'a <a href="PGOCaml_generic.PGOCAML_GENERIC.html#TYPEmonad">monad</a></code></pre></body></html>
|