/usr/share/doc/racket/db/util.html is in racket-doc 6.7-3.
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 | <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"/><title>5 Utilities</title><link rel="stylesheet" type="text/css" href="../scribble.css" title="default"/><link rel="stylesheet" type="text/css" href="../racket.css" title="default"/><link rel="stylesheet" type="text/css" href="../manual-style.css" title="default"/><link rel="stylesheet" type="text/css" href="../manual-racket.css" title="default"/><link rel="stylesheet" type="text/css" href="../doc-site.css" title="default"/><script type="text/javascript" src="../scribble-common.js"></script><script type="text/javascript" src="../manual-racket.js"></script><script type="text/javascript" src="../doc-site.js"></script><script type="text/javascript" src="../local-redirect/local-redirect.js"></script><script type="text/javascript" src="../local-redirect/local-user-redirect.js"></script><!--[if IE 6]><style type="text/css">.SIEHidden { overflow: hidden; }</style><![endif]--></head><body id="doc-racket-lang-org"><div class="tocset"><div class="tocview"><div class="tocviewlist tocviewlisttopspace"><div class="tocviewtitle"><table cellspacing="0" cellpadding="0"><tr><td style="width: 1em;"><a href="javascript:void(0);" title="Expand/Collapse" class="tocviewtoggle" onclick="TocviewToggle(this,"tocview_0");">▼</a></td><td></td><td><a href="index.html" class="tocviewlink" data-pltdoc="x">DB:<span class="mywbr"> </span> Database Connectivity</a></td></tr></table></div><div class="tocviewsublisttop" style="display: block;" id="tocview_0"><table cellspacing="0" cellpadding="0"><tr><td align="right">1 </td><td><a href="using-db.html" class="tocviewlink" data-pltdoc="x">Using Database Connections</a></td></tr><tr><td align="right">2 </td><td><a href="connect.html" class="tocviewlink" data-pltdoc="x">Connections</a></td></tr><tr><td align="right">3 </td><td><a href="query-api.html" class="tocviewlink" data-pltdoc="x">Queries</a></td></tr><tr><td align="right">4 </td><td><a href="sql-types.html" class="tocviewlink" data-pltdoc="x">SQL Types and Conversions</a></td></tr><tr><td align="right">5 </td><td><a href="" class="tocviewselflink" data-pltdoc="x">Utilities</a></td></tr><tr><td align="right">6 </td><td><a href="notes.html" class="tocviewlink" data-pltdoc="x">Notes</a></td></tr></table></div></div><div class="tocviewlist"><table cellspacing="0" cellpadding="0"><tr><td style="width: 1em;"><a href="javascript:void(0);" title="Expand/Collapse" class="tocviewtoggle" onclick="TocviewToggle(this,"tocview_1");">►</a></td><td>5 </td><td><a href="" class="tocviewselflink" data-pltdoc="x">Utilities</a></td></tr></table><div class="tocviewsublistbottom" style="display: none;" id="tocview_1"><table cellspacing="0" cellpadding="0"><tr><td align="right">5.1 </td><td><a href="#%28part._datetime-util%29" class="tocviewlink" data-pltdoc="x">Datetime Type Utilities</a></td></tr><tr><td align="right">5.2 </td><td><a href="#%28part._geometry%29" class="tocviewlink" data-pltdoc="x">Geometric Types</a></td></tr><tr><td align="right">5.3 </td><td><a href="#%28part._postgresql-ext%29" class="tocviewlink" data-pltdoc="x">Postgre<span class="mywbr"> </span>SQL-<wbr></wbr>specific Types</a></td></tr><tr><td align="right">5.4 </td><td><a href="#%28part._util-testing%29" class="tocviewlink" data-pltdoc="x">Testing Database Programs</a></td></tr></table></div></div></div><div class="tocsub"><div class="tocsubtitle">On this page:</div><table class="tocsublist" cellspacing="0"><tr><td><span class="tocsublinknumber">5.1<tt> </tt></span><a href="#%28part._datetime-util%29" class="tocsubseclink" data-pltdoc="x">Datetime Type Utilities</a></td></tr><tr><td><a href="#%28def._%28%28lib._db%2Futil%2Fdatetime..rkt%29._sql-datetime-~3esrfi-date%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">sql-<wbr></wbr>datetime-<wbr></wbr>>srfi-<wbr></wbr>date</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._db%2Futil%2Fdatetime..rkt%29._srfi-date-~3esql-date%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">srfi-<wbr></wbr>date-<wbr></wbr>>sql-<wbr></wbr>date</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._db%2Futil%2Fdatetime..rkt%29._srfi-date-~3esql-time%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">srfi-<wbr></wbr>date-<wbr></wbr>>sql-<wbr></wbr>time</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._db%2Futil%2Fdatetime..rkt%29._srfi-date-~3esql-time-tz%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">srfi-<wbr></wbr>date-<wbr></wbr>>sql-<wbr></wbr>time-<wbr></wbr>tz</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._db%2Futil%2Fdatetime..rkt%29._srfi-date-~3esql-timestamp%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">srfi-<wbr></wbr>date-<wbr></wbr>>sql-<wbr></wbr>timestamp</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._db%2Futil%2Fdatetime..rkt%29._srfi-date-~3esql-timestamp-tz%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">srfi-<wbr></wbr>date-<wbr></wbr>>sql-<wbr></wbr>timestamp-<wbr></wbr>tz</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._db%2Futil%2Fdatetime..rkt%29._sql-day-time-interval-~3eseconds%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">sql-<wbr></wbr>day-<wbr></wbr>time-<wbr></wbr>interval-<wbr></wbr>>seconds</span></span></a></td></tr><tr><td><span class="tocsublinknumber">5.2<tt> </tt></span><a href="#%28part._geometry%29" class="tocsubseclink" data-pltdoc="x">Geometric Types</a></td></tr><tr><td><a href="#%28def._%28%28lib._db%2Futil%2Fgeometry..rkt%29._point%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">point</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._db%2Futil%2Fgeometry..rkt%29._line-string%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">line-<wbr></wbr>string</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._db%2Futil%2Fgeometry..rkt%29._polygon%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">polygon</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._db%2Futil%2Fgeometry..rkt%29._multi-point%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">multi-<wbr></wbr>point</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._db%2Futil%2Fgeometry..rkt%29._multi-line-string%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">multi-<wbr></wbr>line-<wbr></wbr>string</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._db%2Futil%2Fgeometry..rkt%29._multi-polygon%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">multi-<wbr></wbr>polygon</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._db%2Futil%2Fgeometry..rkt%29._geometry-collection%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">geometry-<wbr></wbr>collection</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._db%2Futil%2Fgeometry..rkt%29._geometry2d~3f%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">geometry2d?</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._db%2Futil%2Fgeometry..rkt%29._line~3f%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">line?</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._db%2Futil%2Fgeometry..rkt%29._linear-ring~3f%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">linear-<wbr></wbr>ring?</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._db%2Futil%2Fgeometry..rkt%29._geometry-~3ewkb%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">geometry-<wbr></wbr>>wkb</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._db%2Futil%2Fgeometry..rkt%29._wkb-~3egeometry%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">wkb-<wbr></wbr>>geometry</span></span></a></td></tr><tr><td><span class="tocsublinknumber">5.3<tt> </tt></span><a href="#%28part._postgresql-ext%29" class="tocsubseclink" data-pltdoc="x">Postgre<span class="mywbr"> </span>SQL-<wbr></wbr>specific Types</a></td></tr><tr><td><a href="#%28def._%28%28lib._db%2Futil%2Fpostgresql..rkt%29._pg-array%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">pg-<wbr></wbr>array</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._db%2Futil%2Fpostgresql..rkt%29._pg-array-ref%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">pg-<wbr></wbr>array-<wbr></wbr>ref</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._db%2Futil%2Fpostgresql..rkt%29._pg-array-~3elist%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">pg-<wbr></wbr>array-<wbr></wbr>>list</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._db%2Futil%2Fpostgresql..rkt%29._list-~3epg-array%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">list-<wbr></wbr>>pg-<wbr></wbr>array</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._db%2Futil%2Fpostgresql..rkt%29._pg-empty-range%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">pg-<wbr></wbr>empty-<wbr></wbr>range</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._db%2Futil%2Fpostgresql..rkt%29._pg-range%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">pg-<wbr></wbr>range</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._db%2Futil%2Fpostgresql..rkt%29._pg-range-or-empty~3f%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">pg-<wbr></wbr>range-<wbr></wbr>or-<wbr></wbr>empty?</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._db%2Futil%2Fpostgresql..rkt%29._pg-box%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">pg-<wbr></wbr>box</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._db%2Futil%2Fpostgresql..rkt%29._pg-path%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">pg-<wbr></wbr>path</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._db%2Futil%2Fpostgresql..rkt%29._pg-circle%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">pg-<wbr></wbr>circle</span></span></a></td></tr><tr><td><span class="tocsublinknumber">5.4<tt> </tt></span><a href="#%28part._util-testing%29" class="tocsubseclink" data-pltdoc="x">Testing Database Programs</a></td></tr><tr><td><a href="#%28def._%28%28lib._db%2Futil%2Ftesting..rkt%29._high-latency-connection%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">high-<wbr></wbr>latency-<wbr></wbr>connection</span></span></a></td></tr></table></div></div><div class="maincolumn"><div class="main"><div class="navsettop"><span class="navleft"><form class="searchform"><input class="searchbox" style="color: #888;" type="text" value="...search manuals..." title="Enter a search string to search the manuals" onkeypress="return DoSearchKey(event, this, "6.7", "../");" onfocus="this.style.color="black"; this.style.textAlign="left"; if (this.value == "...search manuals...") this.value="";" onblur="if (this.value.match(/^ *$/)) { this.style.color="#888"; this.style.textAlign="center"; this.value="...search manuals..."; }"/></form> <a href="../index.html" title="up to the documentation top" data-pltdoc="x" onclick="return GotoPLTRoot("6.7");">top</a></span><span class="navright"> <a href="sql-types.html" title="backward to "4 SQL Types and Conversions"" data-pltdoc="x">← prev</a> <a href="index.html" title="up to "DB: Database Connectivity"" data-pltdoc="x">up</a> <a href="notes.html" title="forward to "6 Notes"" data-pltdoc="x">next →</a></span> </div><h3 x-source-module="(lib "db/scribblings/db.scrbl")" x-source-pkg="db-doc" x-part-tag=""util"">5<tt> </tt><a name="(part._util)"></a>Utilities</h3><p>The bindings described in this section are provided by the specific
modules below, not by <a href="index.html" class="RktModLink" data-pltdoc="x"><span class="RktSym">db</span></a> or <a href="connect.html#%28mod-path._db%2Fbase%29" class="RktModLink" data-pltdoc="x"><span class="RktSym">db/base</span></a>.</p><h4 x-source-module="(lib "db/scribblings/db.scrbl")" x-source-pkg="db-doc" x-part-tag=""datetime-util"">5.1<tt> </tt><a name="(part._datetime-util)"></a><a name="(mod-path._db/util/datetime)"></a>Datetime Type Utilities</h4><p><table cellspacing="0" cellpadding="0" class="defmodule"><tr><td align="left"><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=require.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._require%2529%2529&version=6.7" class="RktStxLink Sq" data-pltdoc="x">require</a></span><span class="stt"> </span><a href="#%28mod-path._db%2Futil%2Fdatetime%29" class="RktModLink" data-pltdoc="x"><span class="RktSym">db/util/datetime</span></a><span class="RktPn">)</span></td><td align="right"><span class="RpackageSpec"><span class="Smaller"> package:</span> <span class="stt">db-lib</span></span></td></tr></table></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><table cellspacing="0" cellpadding="0" class="together"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._db/util/datetime..rkt)._sql-datetime-~3esrfi-date))"></a><span title="Provided from: db/util/datetime | Package: db-lib"><span class="RktSym"><a href="#%28def._%28%28lib._db%2Futil%2Fdatetime..rkt%29._sql-datetime-~3esrfi-date%29%29" class="RktValDef RktValLink" data-pltdoc="x">sql-datetime->srfi-date</a></span></span><span class="hspace"> </span><span class="RktVar">t</span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym">srfi:date?</span></p></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">t</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._or%252Fc%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">or/c</a></span><span class="hspace"> </span><span class="RktSym"><a href="sql-types.html#%28def._%28%28lib._db%2Fbase..rkt%29._sql-date~3f%29%29" class="RktValLink" data-pltdoc="x">sql-date?</a></span><span class="hspace"> </span><span class="RktSym"><a href="sql-types.html#%28def._%28%28lib._db%2Fbase..rkt%29._sql-time~3f%29%29" class="RktValLink" data-pltdoc="x">sql-time?</a></span><span class="hspace"> </span><span class="RktSym"><a href="sql-types.html#%28def._%28%28lib._db%2Fbase..rkt%29._sql-timestamp~3f%29%29" class="RktValLink" data-pltdoc="x">sql-timestamp?</a></span><span class="RktPn">)</span></td></tr></table></td></tr><tr><td><table cellspacing="0" cellpadding="0" class="together"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._db/util/datetime..rkt)._srfi-date-~3esql-date))"></a><span title="Provided from: db/util/datetime | Package: db-lib"><span class="RktSym"><a href="#%28def._%28%28lib._db%2Futil%2Fdatetime..rkt%29._srfi-date-~3esql-date%29%29" class="RktValDef RktValLink" data-pltdoc="x">srfi-date->sql-date</a></span></span><span class="hspace"> </span><span class="RktVar">d</span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym"><a href="sql-types.html#%28def._%28%28lib._db%2Fbase..rkt%29._sql-date~3f%29%29" class="RktValLink" data-pltdoc="x">sql-date?</a></span></p></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">d</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym">srfi:date?</span></td></tr></table></td></tr><tr><td><table cellspacing="0" cellpadding="0" class="together"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._db/util/datetime..rkt)._srfi-date-~3esql-time))"></a><span title="Provided from: db/util/datetime | Package: db-lib"><span class="RktSym"><a href="#%28def._%28%28lib._db%2Futil%2Fdatetime..rkt%29._srfi-date-~3esql-time%29%29" class="RktValDef RktValLink" data-pltdoc="x">srfi-date->sql-time</a></span></span><span class="hspace"> </span><span class="RktVar">d</span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym"><a href="sql-types.html#%28def._%28%28lib._db%2Fbase..rkt%29._sql-time~3f%29%29" class="RktValLink" data-pltdoc="x">sql-time?</a></span></p></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">d</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym">srfi:date?</span></td></tr></table></td></tr><tr><td><table cellspacing="0" cellpadding="0" class="together"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._db/util/datetime..rkt)._srfi-date-~3esql-time-tz))"></a><span title="Provided from: db/util/datetime | Package: db-lib"><span class="RktSym"><a href="#%28def._%28%28lib._db%2Futil%2Fdatetime..rkt%29._srfi-date-~3esql-time-tz%29%29" class="RktValDef RktValLink" data-pltdoc="x">srfi-date->sql-time-tz</a></span></span><span class="hspace"> </span><span class="RktVar">d</span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym"><a href="sql-types.html#%28def._%28%28lib._db%2Fbase..rkt%29._sql-time~3f%29%29" class="RktValLink" data-pltdoc="x">sql-time?</a></span></p></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">d</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym">srfi:date?</span></td></tr></table></td></tr><tr><td><table cellspacing="0" cellpadding="0" class="together"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._db/util/datetime..rkt)._srfi-date-~3esql-timestamp))"></a><span title="Provided from: db/util/datetime | Package: db-lib"><span class="RktSym"><a href="#%28def._%28%28lib._db%2Futil%2Fdatetime..rkt%29._srfi-date-~3esql-timestamp%29%29" class="RktValDef RktValLink" data-pltdoc="x">srfi-date->sql-timestamp</a></span></span><span class="hspace"> </span><span class="RktVar">d</span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym"><a href="sql-types.html#%28def._%28%28lib._db%2Fbase..rkt%29._sql-timestamp~3f%29%29" class="RktValLink" data-pltdoc="x">sql-timestamp?</a></span></p></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">d</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym">srfi:date?</span></td></tr></table></td></tr><tr><td><table cellspacing="0" cellpadding="0" class="together"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._db/util/datetime..rkt)._srfi-date-~3esql-timestamp-tz))"></a><span title="Provided from: db/util/datetime | Package: db-lib"><span class="RktSym"><a href="#%28def._%28%28lib._db%2Futil%2Fdatetime..rkt%29._srfi-date-~3esql-timestamp-tz%29%29" class="RktValDef RktValLink" data-pltdoc="x">srfi-date->sql-timestamp-tz</a></span></span><span class="hspace"> </span><span class="RktVar">d</span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym"><a href="sql-types.html#%28def._%28%28lib._db%2Fbase..rkt%29._sql-timestamp~3f%29%29" class="RktValLink" data-pltdoc="x">sql-timestamp?</a></span></p></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">d</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym">srfi:date?</span></td></tr></table></td></tr></table></blockquote></div><div class="SIntrapara">Converts between this library’s date and time values and SRFI 19’s
date values (see <a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?tag=%28mod-path._.%27srfi%2F19.%27%29&version=6.7" class="RktModLink Sq" data-pltdoc="x"><span class="RktSym">srfi/19</span></a>). SRFI dates store more
information than SQL dates and times, so converting a SQL time to a
SRFI date, for example, puts zeroes in the year, month, and day
fields.</div></p><p><div class="SIntrapara">Examples:</div><div class="SIntrapara"><blockquote class="SCodeFlow"><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="stt">> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._db%2Futil%2Fdatetime..rkt%29._sql-datetime-~3esrfi-date%29%29" class="RktValLink" data-pltdoc="x">sql-datetime->srfi-date</a></span></td></tr><tr><td><span class="hspace"> </span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="query-api.html#%28def._%28%28lib._db%2Fbase..rkt%29._query-value%29%29" class="RktValLink" data-pltdoc="x">query-value</a></span><span class="hspace"> </span><span class="RktSym">pgc</span><span class="hspace"> </span><span class="RktVal">"select time '7:30'"</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr></table></td></tr><tr><td><p><span class="RktErr">date-year-day: TIME-ERROR type invalid-month-specification:</span></p></td></tr><tr><td><p><span class="RktErr">0</span></p></td></tr><tr><td><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="stt">> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._db%2Futil%2Fdatetime..rkt%29._sql-datetime-~3esrfi-date%29%29" class="RktValLink" data-pltdoc="x">sql-datetime->srfi-date</a></span></td></tr><tr><td><span class="hspace"> </span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="query-api.html#%28def._%28%28lib._db%2Fbase..rkt%29._query-value%29%29" class="RktValLink" data-pltdoc="x">query-value</a></span><span class="hspace"> </span><span class="RktSym">pgc</span><span class="hspace"> </span><span class="RktVal">"select date '25-dec-1980'"</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr></table></td></tr><tr><td><p><span class="RktErr">eval: unable to replay evaluation of</span></p></td></tr><tr><td><p><span class="RktErr">(sql-datetime->srfi-date (query-value pgc "select date</span></p></td></tr><tr><td><p><span class="RktErr">'25-dec-1980'"))</span></p></td></tr><tr><td><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="stt">> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._db%2Futil%2Fdatetime..rkt%29._sql-datetime-~3esrfi-date%29%29" class="RktValLink" data-pltdoc="x">sql-datetime->srfi-date</a></span></td></tr><tr><td><span class="hspace"> </span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="query-api.html#%28def._%28%28lib._db%2Fbase..rkt%29._query-value%29%29" class="RktValLink" data-pltdoc="x">query-value</a></span><span class="hspace"> </span><span class="RktSym">pgc</span><span class="hspace"> </span><span class="RktVal">"select timestamp 'epoch'"</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr></table></td></tr><tr><td><p><span class="RktErr">eval: unable to replay evaluation of</span></p></td></tr><tr><td><p><span class="RktErr">(sql-datetime->srfi-date (query-value pgc "select timestamp</span></p></td></tr><tr><td><p><span class="RktErr">'epoch'"))</span></p></td></tr></table></blockquote></div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._db/util/datetime..rkt)._sql-day-time-interval-~3eseconds))"></a><span title="Provided from: db/util/datetime | Package: db-lib"><span class="RktSym"><a href="#%28def._%28%28lib._db%2Futil%2Fdatetime..rkt%29._sql-day-time-interval-~3eseconds%29%29" class="RktValDef RktValLink" data-pltdoc="x">sql-day-time-interval->seconds</a></span></span><span class="hspace"> </span><span class="RktVar">interval</span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=number-types.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._rational%7E3f%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">rational?</a></span></p></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">interval</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="sql-types.html#%28def._%28%28lib._db%2Fbase..rkt%29._sql-day-time-interval~3f%29%29" class="RktValLink" data-pltdoc="x">sql-day-time-interval?</a></span></td></tr></table></blockquote></div><div class="SIntrapara">Returns the length of <span class="RktVar">interval</span> in seconds.</div></p><h4 x-source-module="(lib "db/scribblings/db.scrbl")" x-source-pkg="db-doc" x-part-tag=""geometry"">5.2<tt> </tt><a name="(part._geometry)"></a><a name="(mod-path._db/util/geometry)"></a><a name="(idx._(gentag._8._(lib._db/scribblings/db..scrbl)))"></a>Geometric Types</h4><p><table cellspacing="0" cellpadding="0" class="defmodule"><tr><td align="left"><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=require.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._require%2529%2529&version=6.7" class="RktStxLink Sq" data-pltdoc="x">require</a></span><span class="stt"> </span><a href="#%28mod-path._db%2Futil%2Fgeometry%29" class="RktModLink" data-pltdoc="x"><span class="RktSym">db/util/geometry</span></a><span class="RktPn">)</span></td><td align="right"><span class="RpackageSpec"><span class="Smaller"> package:</span> <span class="stt">db-lib</span></span></td></tr></table></p><p>The following structures and functions deal with geometric values
based on the OpenGIS (ISO 19125) model.</p><p>Note: Geometric columns defined using the PostGIS extension to
PostgreSQL are not directly supported. Instead, data should be
exchanged in the Well-Known Binary format; conversion of the following
structures to and from WKB format is supported by the
<span class="RktSym"><a href="#%28def._%28%28lib._db%2Futil%2Fgeometry..rkt%29._wkb-~3egeometry%29%29" class="RktValLink" data-pltdoc="x">wkb->geometry</a></span> and <span class="RktSym"><a href="#%28def._%28%28lib._db%2Futil%2Fgeometry..rkt%29._geometry-~3ewkb%29%29" class="RktValLink" data-pltdoc="x">geometry->wkb</a></span> functions.</p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>struct</p></div></div><p class="RForeground"><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=define-struct.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._struct%2529%2529&version=6.7" class="RktStxLink Sq" data-pltdoc="x">struct</a></span><span class="stt"> </span><a name="(def._((lib._db/util/geometry..rkt)._point-y))"></a><a name="(def._((lib._db/util/geometry..rkt)._point-x))"></a><a name="(def._((lib._db/util/geometry..rkt)._point~3f))"></a><a name="(def._((lib._db/util/geometry..rkt)._struct~3apoint))"></a><a name="(def._((lib._db/util/geometry..rkt)._point))"></a><span title="Provided from: db/util/geometry | Package: db-lib"><span class="RktSym"><a href="#%28def._%28%28lib._db%2Futil%2Fgeometry..rkt%29._point%29%29" class="RktValDef RktValLink" data-pltdoc="x">point</a></span></span><span class="stt"> </span><span class="RktPn">(</span><span class="RktSym">x</span><span class="stt"> </span><span class="RktSym">y</span><span class="RktPn">)</span><span class="RktPn">)</span></p></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktSym">x</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=number-types.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._real%7E3f%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">real?</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktSym">y</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=number-types.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._real%7E3f%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">real?</a></span></td></tr></table></blockquote></div><div class="SIntrapara">Represents an OpenGIS <span class="stt">Point</span>.
</div><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>struct</p></div></div><p class="RForeground"><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=define-struct.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._struct%2529%2529&version=6.7" class="RktStxLink Sq" data-pltdoc="x">struct</a></span><span class="stt"> </span><a name="(def._((lib._db/util/geometry..rkt)._line-string-points))"></a><a name="(def._((lib._db/util/geometry..rkt)._line-string~3f))"></a><a name="(def._((lib._db/util/geometry..rkt)._struct~3aline-string))"></a><a name="(def._((lib._db/util/geometry..rkt)._line-string))"></a><span title="Provided from: db/util/geometry | Package: db-lib"><span class="RktSym"><a href="#%28def._%28%28lib._db%2Futil%2Fgeometry..rkt%29._line-string%29%29" class="RktValDef RktValLink" data-pltdoc="x">line-string</a></span></span><span class="stt"> </span><span class="RktPn">(</span><span class="RktSym">points</span><span class="RktPn">)</span><span class="RktPn">)</span></p></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktSym">points</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._listof%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">listof</a></span><span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._db%2Futil%2Fgeometry..rkt%29._point~3f%29%29" class="RktValLink" data-pltdoc="x">point?</a></span><span class="RktPn">)</span></td></tr></table></blockquote></div><div class="SIntrapara">Represents an OpenGIS <span class="stt">LineString</span>.
</div><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>struct</p></div></div><p class="RForeground"><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=define-struct.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._struct%2529%2529&version=6.7" class="RktStxLink Sq" data-pltdoc="x">struct</a></span><span class="stt"> </span><a name="(def._((lib._db/util/geometry..rkt)._polygon-interiors))"></a><a name="(def._((lib._db/util/geometry..rkt)._polygon-exterior))"></a><a name="(def._((lib._db/util/geometry..rkt)._polygon~3f))"></a><a name="(def._((lib._db/util/geometry..rkt)._struct~3apolygon))"></a><a name="(def._((lib._db/util/geometry..rkt)._polygon))"></a><span title="Provided from: db/util/geometry | Package: db-lib"><span class="RktSym"><a href="#%28def._%28%28lib._db%2Futil%2Fgeometry..rkt%29._polygon%29%29" class="RktValDef RktValLink" data-pltdoc="x">polygon</a></span></span><span class="stt"> </span><span class="RktPn">(</span><span class="RktSym">exterior</span><span class="stt"> </span><span class="RktSym">interiors</span><span class="RktPn">)</span><span class="RktPn">)</span></p></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktSym">exterior</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._db%2Futil%2Fgeometry..rkt%29._linear-ring~3f%29%29" class="RktValLink" data-pltdoc="x">linear-ring?</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktSym">interiors</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._listof%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">listof</a></span><span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._db%2Futil%2Fgeometry..rkt%29._linear-ring~3f%29%29" class="RktValLink" data-pltdoc="x">linear-ring?</a></span><span class="RktPn">)</span></td></tr></table></blockquote></div><div class="SIntrapara">Represents an OpenGIS <span class="stt">Polygon</span>.
</div><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>struct</p></div></div><p class="RForeground"><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=define-struct.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._struct%2529%2529&version=6.7" class="RktStxLink Sq" data-pltdoc="x">struct</a></span><span class="stt"> </span><a name="(def._((lib._db/util/geometry..rkt)._multi-point-elements))"></a><a name="(def._((lib._db/util/geometry..rkt)._multi-point~3f))"></a><a name="(def._((lib._db/util/geometry..rkt)._struct~3amulti-point))"></a><a name="(def._((lib._db/util/geometry..rkt)._multi-point))"></a><span title="Provided from: db/util/geometry | Package: db-lib"><span class="RktSym"><a href="#%28def._%28%28lib._db%2Futil%2Fgeometry..rkt%29._multi-point%29%29" class="RktValDef RktValLink" data-pltdoc="x">multi-point</a></span></span><span class="stt"> </span><span class="RktPn">(</span><span class="RktSym">elements</span><span class="RktPn">)</span><span class="RktPn">)</span></p></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktSym">elements</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._listof%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">listof</a></span><span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._db%2Futil%2Fgeometry..rkt%29._point~3f%29%29" class="RktValLink" data-pltdoc="x">point?</a></span><span class="RktPn">)</span></td></tr></table></blockquote></div><div class="SIntrapara">Represents an OpenGIS <span class="stt">MultiPoint</span>, a collection of points.
</div><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>struct</p></div></div><p class="RForeground"><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=define-struct.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._struct%2529%2529&version=6.7" class="RktStxLink Sq" data-pltdoc="x">struct</a></span><span class="stt"> </span><a name="(def._((lib._db/util/geometry..rkt)._multi-line-string-elements))"></a><a name="(def._((lib._db/util/geometry..rkt)._multi-line-string~3f))"></a><a name="(def._((lib._db/util/geometry..rkt)._struct~3amulti-line-string))"></a><a name="(def._((lib._db/util/geometry..rkt)._multi-line-string))"></a><span title="Provided from: db/util/geometry | Package: db-lib"><span class="RktSym"><a href="#%28def._%28%28lib._db%2Futil%2Fgeometry..rkt%29._multi-line-string%29%29" class="RktValDef RktValLink" data-pltdoc="x">multi-line-string</a></span></span><span class="stt"> </span><span class="RktPn">(</span><span class="RktSym">elements</span><span class="RktPn">)</span><span class="RktPn">)</span></p></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktSym">elements</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._listof%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">listof</a></span><span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._db%2Futil%2Fgeometry..rkt%29._line-string~3f%29%29" class="RktValLink" data-pltdoc="x">line-string?</a></span><span class="RktPn">)</span></td></tr></table></blockquote></div><div class="SIntrapara">Represents an OpenGIS <span class="stt">MultiLineString</span>, a collection of line-strings.
</div><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>struct</p></div></div><p class="RForeground"><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=define-struct.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._struct%2529%2529&version=6.7" class="RktStxLink Sq" data-pltdoc="x">struct</a></span><span class="stt"> </span><a name="(def._((lib._db/util/geometry..rkt)._multi-polygon-elements))"></a><a name="(def._((lib._db/util/geometry..rkt)._multi-polygon~3f))"></a><a name="(def._((lib._db/util/geometry..rkt)._struct~3amulti-polygon))"></a><a name="(def._((lib._db/util/geometry..rkt)._multi-polygon))"></a><span title="Provided from: db/util/geometry | Package: db-lib"><span class="RktSym"><a href="#%28def._%28%28lib._db%2Futil%2Fgeometry..rkt%29._multi-polygon%29%29" class="RktValDef RktValLink" data-pltdoc="x">multi-polygon</a></span></span><span class="stt"> </span><span class="RktPn">(</span><span class="RktSym">elements</span><span class="RktPn">)</span><span class="RktPn">)</span></p></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktSym">elements</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._listof%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">listof</a></span><span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._db%2Futil%2Fgeometry..rkt%29._polygon~3f%29%29" class="RktValLink" data-pltdoc="x">polygon?</a></span><span class="RktPn">)</span></td></tr></table></blockquote></div><div class="SIntrapara">Represents an OpenGIS <span class="stt">MultiPolygon</span>, a collection of polygons.
</div><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>struct</p></div></div><p class="RForeground"><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=define-struct.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._struct%2529%2529&version=6.7" class="RktStxLink Sq" data-pltdoc="x">struct</a></span><span class="stt"> </span><a name="(def._((lib._db/util/geometry..rkt)._geometry-collection-elements))"></a><a name="(def._((lib._db/util/geometry..rkt)._geometry-collection~3f))"></a><a name="(def._((lib._db/util/geometry..rkt)._struct~3ageometry-collection))"></a><a name="(def._((lib._db/util/geometry..rkt)._geometry-collection))"></a><span title="Provided from: db/util/geometry | Package: db-lib"><span class="RktSym"><a href="#%28def._%28%28lib._db%2Futil%2Fgeometry..rkt%29._geometry-collection%29%29" class="RktValDef RktValLink" data-pltdoc="x">geometry-collection</a></span></span><span class="stt"> </span><span class="RktPn">(</span><span class="RktSym">elements</span><span class="RktPn">)</span><span class="RktPn">)</span></p></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktSym">elements</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._listof%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">listof</a></span><span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._db%2Futil%2Fgeometry..rkt%29._geometry2d~3f%29%29" class="RktValLink" data-pltdoc="x">geometry2d?</a></span><span class="RktPn">)</span></td></tr></table></blockquote></div><div class="SIntrapara">Represents an OpenGIS <span class="stt">GeometryCollection</span>, a collection of
arbitrary geometric values.</div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._db/util/geometry..rkt)._geometry2d~3f))"></a><span title="Provided from: db/util/geometry | Package: db-lib"><span class="RktSym"><a href="#%28def._%28%28lib._db%2Futil%2Fgeometry..rkt%29._geometry2d~3f%29%29" class="RktValDef RktValLink" data-pltdoc="x">geometry2d?</a></span></span><span class="hspace"> </span><span class="RktVar">x</span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=booleans.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._boolean%7E3f%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">boolean?</a></span></p></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">x</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._any%252Fc%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">any/c</a></span></td></tr></table></blockquote></div><div class="SIntrapara">Returns <span class="RktVal">#t</span> if <span class="RktVar">x</span> is a <span class="RktSym"><a href="#%28def._%28%28lib._db%2Futil%2Fgeometry..rkt%29._point%29%29" class="RktValLink" data-pltdoc="x">point</a></span>,
<span class="RktSym"><a href="#%28def._%28%28lib._db%2Futil%2Fgeometry..rkt%29._line-string%29%29" class="RktValLink" data-pltdoc="x">line-string</a></span>, <span class="RktSym"><a href="#%28def._%28%28lib._db%2Futil%2Fgeometry..rkt%29._polygon%29%29" class="RktValLink" data-pltdoc="x">polygon</a></span>, <span class="RktSym"><a href="#%28def._%28%28lib._db%2Futil%2Fgeometry..rkt%29._multi-point%29%29" class="RktValLink" data-pltdoc="x">multi-point</a></span>,
<span class="RktSym"><a href="#%28def._%28%28lib._db%2Futil%2Fgeometry..rkt%29._multi-line-string%29%29" class="RktValLink" data-pltdoc="x">multi-line-string</a></span>, <span class="RktSym"><a href="#%28def._%28%28lib._db%2Futil%2Fgeometry..rkt%29._multi-polygon%29%29" class="RktValLink" data-pltdoc="x">multi-polygon</a></span>, or
<span class="RktSym"><a href="#%28def._%28%28lib._db%2Futil%2Fgeometry..rkt%29._geometry-collection%29%29" class="RktValLink" data-pltdoc="x">geometry-collection</a></span>; <span class="RktVal">#f</span> othewise.</div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._db/util/geometry..rkt)._line~3f))"></a><span title="Provided from: db/util/geometry | Package: db-lib"><span class="RktSym"><a href="#%28def._%28%28lib._db%2Futil%2Fgeometry..rkt%29._line~3f%29%29" class="RktValDef RktValLink" data-pltdoc="x">line?</a></span></span><span class="hspace"> </span><span class="RktVar">x</span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=booleans.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._boolean%7E3f%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">boolean?</a></span></p></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">x</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._any%252Fc%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">any/c</a></span></td></tr></table></blockquote></div><div class="SIntrapara">Returns <span class="RktVal">#t</span> if <span class="RktVar">x</span> is a <span class="RktSym"><a href="#%28def._%28%28lib._db%2Futil%2Fgeometry..rkt%29._line-string%29%29" class="RktValLink" data-pltdoc="x">line-string</a></span>
consisting of exactly two points (cf OpenGIS <span class="stt">Line</span>); <span class="RktVal">#f</span>
otherwise.</div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._db/util/geometry..rkt)._linear-ring~3f))"></a><span title="Provided from: db/util/geometry | Package: db-lib"><span class="RktSym"><a href="#%28def._%28%28lib._db%2Futil%2Fgeometry..rkt%29._linear-ring~3f%29%29" class="RktValDef RktValLink" data-pltdoc="x">linear-ring?</a></span></span><span class="hspace"> </span><span class="RktVar">x</span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=booleans.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._boolean%7E3f%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">boolean?</a></span></p></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">x</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._any%252Fc%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">any/c</a></span></td></tr></table></blockquote></div><div class="SIntrapara">Returns <span class="RktVal">#t</span> if <span class="RktVar">x</span> is a <span class="RktSym"><a href="#%28def._%28%28lib._db%2Futil%2Fgeometry..rkt%29._line-string%29%29" class="RktValLink" data-pltdoc="x">line-string</a></span> whose
first and last points are equal (cf OpenGIS <span class="stt">LinearRing</span>);
<span class="RktVal">#f</span> otherwise.</div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._db/util/geometry..rkt)._geometry-~3ewkb))"></a><span title="Provided from: db/util/geometry | Package: db-lib"><span class="RktSym"><a href="#%28def._%28%28lib._db%2Futil%2Fgeometry..rkt%29._geometry-~3ewkb%29%29" class="RktValDef RktValLink" data-pltdoc="x">geometry->wkb</a></span></span><span class="hspace"> </span><span class="RktVar">g</span><span class="hspace"> </span><span class="RktPn">#:big-endian?</span><span class="hspace"> </span><span class="RktVar">big-endian?</span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=bytestrings.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._bytes%7E3f%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">bytes?</a></span></p></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">g</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._db%2Futil%2Fgeometry..rkt%29._geometry2d~3f%29%29" class="RktValLink" data-pltdoc="x">geometry2d?</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">big-endian?</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=generic-numbers.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._system-big-endian%7E3f%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">system-big-endian?</a></span><span class="RktPn">)</span></td></tr></table></blockquote></div><div class="SIntrapara">Returns the Well-Known Binary (WKB) encoding of the geometric value
<span class="RktVar">g</span>. The <span class="RktVar">big-endian?</span> argument determines the byte
order used (the WKB format includes byte-order markers, so a robust
client should accept either encoding).</div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._db/util/geometry..rkt)._wkb-~3egeometry))"></a><span title="Provided from: db/util/geometry | Package: db-lib"><span class="RktSym"><a href="#%28def._%28%28lib._db%2Futil%2Fgeometry..rkt%29._wkb-~3egeometry%29%29" class="RktValDef RktValLink" data-pltdoc="x">wkb->geometry</a></span></span><span class="hspace"> </span><span class="RktVar">b</span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._db%2Futil%2Fgeometry..rkt%29._geometry2d~3f%29%29" class="RktValLink" data-pltdoc="x">geometry2d?</a></span></p></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">b</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=bytestrings.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._bytes%7E3f%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">bytes?</a></span></td></tr></table></blockquote></div><div class="SIntrapara">Decodes the Well-Known Binary (WKB) representation of a geometric
value.</div></p><h4 x-source-module="(lib "db/scribblings/db.scrbl")" x-source-pkg="db-doc" x-part-tag=""postgresql-ext"">5.3<tt> </tt><a name="(part._postgresql-ext)"></a><a name="(mod-path._db/util/postgresql)"></a>PostgreSQL-specific Types</h4><p><table cellspacing="0" cellpadding="0" class="defmodule"><tr><td align="left"><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=require.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._require%2529%2529&version=6.7" class="RktStxLink Sq" data-pltdoc="x">require</a></span><span class="stt"> </span><a href="#%28mod-path._db%2Futil%2Fpostgresql%29" class="RktModLink" data-pltdoc="x"><span class="RktSym">db/util/postgresql</span></a><span class="RktPn">)</span></td><td align="right"><span class="RpackageSpec"><span class="Smaller"> package:</span> <span class="stt">db-lib</span></span></td></tr></table></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>struct</p></div></div><table cellspacing="0" cellpadding="0" class="RForeground"><tr><td><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=define-struct.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._struct%2529%2529&version=6.7" class="RktStxLink Sq" data-pltdoc="x">struct</a></span></td><td><span class="hspace"> </span></td><td><span class="nobreak"><a name="(def._((lib._db/util/postgresql..rkt)._pg-array-contents))"></a><a name="(def._((lib._db/util/postgresql..rkt)._pg-array-dimension-lower-bounds))"></a><a name="(def._((lib._db/util/postgresql..rkt)._pg-array-dimension-lengths))"></a><a name="(def._((lib._db/util/postgresql..rkt)._pg-array-dimensions))"></a><a name="(def._((lib._db/util/postgresql..rkt)._pg-array~3f))"></a><a name="(def._((lib._db/util/postgresql..rkt)._struct~3apg-array))"></a><a name="(def._((lib._db/util/postgresql..rkt)._pg-array))"></a><span title="Provided from: db/util/postgresql | Package: db-lib"><span class="RktSym"><a href="#%28def._%28%28lib._db%2Futil%2Fpostgresql..rkt%29._pg-array%29%29" class="RktValDef RktValLink" data-pltdoc="x">pg-array</a></span></span></span></td><td><span class="hspace"> </span><span class="RktPn">(</span></td><td><span class="nobreak"><span class="RktSym">dimensions</span></span></td></tr><tr><td><span class="hspace"> </span></td><td><span class="hspace"> </span></td><td><span class="hspace"> </span></td><td><span class="hspace"> </span></td><td><span class="RktSym">dimension-lengths</span></td></tr><tr><td><span class="hspace"> </span></td><td><span class="hspace"> </span></td><td><span class="hspace"> </span></td><td><span class="hspace"> </span></td><td><span class="RktSym">dimension-lower-bounds</span></td></tr><tr><td><span class="hspace"> </span></td><td><span class="hspace"> </span></td><td><span class="hspace"> </span></td><td><span class="hspace"> </span></td><td><span class="RktSym">contents</span><span class="RktPn">))</span></td></tr></table></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktSym">dimensions</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=number-types.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._exact-nonnegative-integer%7E3f%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">exact-nonnegative-integer?</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktSym">dimension-lengths</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._listof%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">listof</a></span><span class="hspace"> </span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=number-types.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._exact-positive-integer%7E3f%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">exact-positive-integer?</a></span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="RktSym">dimension-lower-bounds</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._listof%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">listof</a></span><span class="hspace"> </span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=number-types.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._exact-integer%7E3f%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">exact-integer?</a></span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="RktSym">contents</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=vectors.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._vector%7E3f%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">vector?</a></span></td></tr></table></blockquote></div><div class="SIntrapara">Represents a PostrgreSQL array. The <span class="RktSym">dimension-lengths</span> and
<span class="RktSym">dimension-lower-bounds</span> fields are both lists of
<span class="RktSym">dimensions</span> elements. By default, PostgreSQL array indexes
start with 1 (not 0), so <span class="RktSym">dimension-lower-bounds</span> is typically
a list of <span class="RktVal">1</span>s.</div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._db/util/postgresql..rkt)._pg-array-ref))"></a><span title="Provided from: db/util/postgresql | Package: db-lib"><span class="RktSym"><a href="#%28def._%28%28lib._db%2Futil%2Fpostgresql..rkt%29._pg-array-ref%29%29" class="RktValDef RktValLink" data-pltdoc="x">pg-array-ref</a></span></span><span class="hspace"> </span><span class="RktVar">arr</span><span class="hspace"> </span><span class="RktVar">index</span><span class="hspace"> </span><span class="RktMeta">...+</span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._any%252Fc%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">any/c</a></span></p></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">arr</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._db%2Futil%2Fpostgresql..rkt%29._pg-array~3f%29%29" class="RktValLink" data-pltdoc="x">pg-array?</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">index</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=number-types.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._exact-integer%7E3f%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">exact-integer?</a></span></td></tr></table></blockquote></div><div class="SIntrapara">Returns the element of <span class="RktVar">arr</span> at the given position. There must
be as many <span class="RktVar">index</span> arguments as the dimension of
<span class="RktVar">arr</span>. Recall that PostgreSQL array indexes usually start with
1, not 0.</div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._db/util/postgresql..rkt)._pg-array-~3elist))"></a><span title="Provided from: db/util/postgresql | Package: db-lib"><span class="RktSym"><a href="#%28def._%28%28lib._db%2Futil%2Fpostgresql..rkt%29._pg-array-~3elist%29%29" class="RktValDef RktValLink" data-pltdoc="x">pg-array->list</a></span></span><span class="hspace"> </span><span class="RktVar">arr</span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=pairs.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._list%7E3f%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">list?</a></span></p></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">arr</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._db%2Futil%2Fpostgresql..rkt%29._pg-array~3f%29%29" class="RktValLink" data-pltdoc="x">pg-array?</a></span></td></tr></table></blockquote></div><div class="SIntrapara">Returns a list of <span class="RktVar">arr</span>’s contents. The dimension of
<span class="RktVar">arr</span> must be 1; otherwise an error is raised.</div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._db/util/postgresql..rkt)._list-~3epg-array))"></a><span title="Provided from: db/util/postgresql | Package: db-lib"><span class="RktSym"><a href="#%28def._%28%28lib._db%2Futil%2Fpostgresql..rkt%29._list-~3epg-array%29%29" class="RktValDef RktValLink" data-pltdoc="x">list->pg-array</a></span></span><span class="hspace"> </span><span class="RktVar">lst</span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._db%2Futil%2Fpostgresql..rkt%29._pg-array~3f%29%29" class="RktValLink" data-pltdoc="x">pg-array?</a></span></p></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">lst</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=pairs.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._list%7E3f%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">list?</a></span></td></tr></table></blockquote></div><div class="SIntrapara">Returns a <span class="RktSym"><a href="#%28def._%28%28lib._db%2Futil%2Fpostgresql..rkt%29._pg-array%29%29" class="RktValLink" data-pltdoc="x">pg-array</a></span> of dimension 1 with the contents of
<span class="RktVar">lst</span>.</div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>struct</p></div></div><p class="RForeground"><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=define-struct.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._struct%2529%2529&version=6.7" class="RktStxLink Sq" data-pltdoc="x">struct</a></span><span class="stt"> </span><a name="(def._((lib._db/util/postgresql..rkt)._pg-empty-range~3f))"></a><a name="(def._((lib._db/util/postgresql..rkt)._struct~3apg-empty-range))"></a><a name="(def._((lib._db/util/postgresql..rkt)._pg-empty-range))"></a><span title="Provided from: db/util/postgresql | Package: db-lib"><span class="RktSym"><a href="#%28def._%28%28lib._db%2Futil%2Fpostgresql..rkt%29._pg-empty-range%29%29" class="RktValDef RktValLink" data-pltdoc="x">pg-empty-range</a></span></span><span class="stt"> </span><span class="RktPn">(</span><span class="RktPn">)</span><span class="RktPn">)</span></p></blockquote></td></tr></table></blockquote></div><div class="SIntrapara">Represents an empty range.</div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>struct</p></div></div><p class="RForeground"><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=define-struct.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._struct%2529%2529&version=6.7" class="RktStxLink Sq" data-pltdoc="x">struct</a></span><span class="stt"> </span><a name="(def._((lib._db/util/postgresql..rkt)._pg-range-includes-ub~3f))"></a><a name="(def._((lib._db/util/postgresql..rkt)._pg-range-ub))"></a><a name="(def._((lib._db/util/postgresql..rkt)._pg-range-includes-lb~3f))"></a><a name="(def._((lib._db/util/postgresql..rkt)._pg-range-lb))"></a><a name="(def._((lib._db/util/postgresql..rkt)._pg-range~3f))"></a><a name="(def._((lib._db/util/postgresql..rkt)._struct~3apg-range))"></a><a name="(def._((lib._db/util/postgresql..rkt)._pg-range))"></a><span title="Provided from: db/util/postgresql | Package: db-lib"><span class="RktSym"><a href="#%28def._%28%28lib._db%2Futil%2Fpostgresql..rkt%29._pg-range%29%29" class="RktValDef RktValLink" data-pltdoc="x">pg-range</a></span></span><span class="stt"> </span><span class="RktPn">(</span><span class="RktSym">lb</span><span class="stt"> </span><span class="RktSym">includes-lb?</span><span class="stt"> </span><span class="RktSym">ub</span><span class="stt"> </span><span class="RktSym">includes-ub?</span><span class="RktPn">)</span><span class="RktPn">)</span></p></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktSym">lb</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktVar">range-type</span></td></tr><tr><td><span class="hspace"> </span><span class="RktSym">includes-lb?</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=booleans.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._boolean%7E3f%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">boolean?</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktSym">ub</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktVar">range-type</span></td></tr><tr><td><span class="hspace"> </span><span class="RktSym">includes-ub?</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=booleans.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._boolean%7E3f%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">boolean?</a></span></td></tr></table></blockquote></div><div class="SIntrapara">Represents a range of values from <span class="RktSym">lb</span> (lower bound) to
<span class="RktSym">ub</span> (upper bound). The <span class="RktSym">includes-lb?</span> and
<span class="RktSym">includes-ub?</span> fields indicate whether each end of the range is
open or closed.</div></p><p>The <span class="RktSym">lb</span> and <span class="RktSym">ub</span> fields must have the same type; the
permissible types are exact integers, real numbers, and
<span class="RktSym"><a href="sql-types.html#%28def._%28%28lib._db%2Fbase..rkt%29._sql-timestamp%29%29" class="RktValLink" data-pltdoc="x">sql-timestamp</a></span>s. Either or both bounds may also be
<span class="RktVal">#f</span>, which indicates the range is unbounded on that end.</p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._db/util/postgresql..rkt)._pg-range-or-empty~3f))"></a><span title="Provided from: db/util/postgresql | Package: db-lib"><span class="RktSym"><a href="#%28def._%28%28lib._db%2Futil%2Fpostgresql..rkt%29._pg-range-or-empty~3f%29%29" class="RktValDef RktValLink" data-pltdoc="x">pg-range-or-empty?</a></span></span><span class="hspace"> </span><span class="RktVar">v</span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=booleans.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._boolean%7E3f%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">boolean?</a></span></p></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">v</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._any%252Fc%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">any/c</a></span></td></tr></table></blockquote></div><div class="SIntrapara">Returns <span class="RktVal">#t</span> if <span class="RktVar">v</span> is a <span class="RktSym"><a href="#%28def._%28%28lib._db%2Futil%2Fpostgresql..rkt%29._pg-range%29%29" class="RktValLink" data-pltdoc="x">pg-range</a></span> or
<span class="RktSym"><a href="#%28def._%28%28lib._db%2Futil%2Fpostgresql..rkt%29._pg-empty-range%29%29" class="RktValLink" data-pltdoc="x">pg-empty-range</a></span> instance; otherwise, returns <span class="RktVal">#f</span>.</div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><table cellspacing="0" cellpadding="0" class="together"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>struct</p></div></div><p class="RForeground"><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=define-struct.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._struct%2529%2529&version=6.7" class="RktStxLink Sq" data-pltdoc="x">struct</a></span><span class="stt"> </span><a name="(def._((lib._db/util/postgresql..rkt)._pg-box-sw))"></a><a name="(def._((lib._db/util/postgresql..rkt)._pg-box-ne))"></a><a name="(def._((lib._db/util/postgresql..rkt)._pg-box~3f))"></a><a name="(def._((lib._db/util/postgresql..rkt)._struct~3apg-box))"></a><a name="(def._((lib._db/util/postgresql..rkt)._pg-box))"></a><span title="Provided from: db/util/postgresql | Package: db-lib"><span class="RktSym"><a href="#%28def._%28%28lib._db%2Futil%2Fpostgresql..rkt%29._pg-box%29%29" class="RktValDef RktValLink" data-pltdoc="x">pg-box</a></span></span><span class="stt"> </span><span class="RktPn">(</span><span class="RktSym">ne</span><span class="stt"> </span><span class="RktSym">sw</span><span class="RktPn">)</span><span class="RktPn">)</span></p></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktSym">ne</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._db%2Futil%2Fgeometry..rkt%29._point~3f%29%29" class="RktValLink" data-pltdoc="x">point?</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktSym">sw</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._db%2Futil%2Fgeometry..rkt%29._point~3f%29%29" class="RktValLink" data-pltdoc="x">point?</a></span></td></tr></table></td></tr><tr><td><table cellspacing="0" cellpadding="0" class="together"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>struct</p></div></div><p class="RForeground"><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=define-struct.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._struct%2529%2529&version=6.7" class="RktStxLink Sq" data-pltdoc="x">struct</a></span><span class="stt"> </span><a name="(def._((lib._db/util/postgresql..rkt)._pg-path-points))"></a><a name="(def._((lib._db/util/postgresql..rkt)._pg-path-closed~3f))"></a><a name="(def._((lib._db/util/postgresql..rkt)._pg-path~3f))"></a><a name="(def._((lib._db/util/postgresql..rkt)._struct~3apg-path))"></a><a name="(def._((lib._db/util/postgresql..rkt)._pg-path))"></a><span title="Provided from: db/util/postgresql | Package: db-lib"><span class="RktSym"><a href="#%28def._%28%28lib._db%2Futil%2Fpostgresql..rkt%29._pg-path%29%29" class="RktValDef RktValLink" data-pltdoc="x">pg-path</a></span></span><span class="stt"> </span><span class="RktPn">(</span><span class="RktSym">closed?</span><span class="stt"> </span><span class="RktSym">points</span><span class="RktPn">)</span><span class="RktPn">)</span></p></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktSym">closed?</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=booleans.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._boolean%7E3f%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">boolean?</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktSym">points</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._listof%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">listof</a></span><span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._db%2Futil%2Fgeometry..rkt%29._point~3f%29%29" class="RktValLink" data-pltdoc="x">point?</a></span><span class="RktPn">)</span></td></tr></table></td></tr><tr><td><table cellspacing="0" cellpadding="0" class="together"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>struct</p></div></div><p class="RForeground"><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=define-struct.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._struct%2529%2529&version=6.7" class="RktStxLink Sq" data-pltdoc="x">struct</a></span><span class="stt"> </span><a name="(def._((lib._db/util/postgresql..rkt)._pg-circle-radius))"></a><a name="(def._((lib._db/util/postgresql..rkt)._pg-circle-center))"></a><a name="(def._((lib._db/util/postgresql..rkt)._pg-circle~3f))"></a><a name="(def._((lib._db/util/postgresql..rkt)._struct~3apg-circle))"></a><a name="(def._((lib._db/util/postgresql..rkt)._pg-circle))"></a><span title="Provided from: db/util/postgresql | Package: db-lib"><span class="RktSym"><a href="#%28def._%28%28lib._db%2Futil%2Fpostgresql..rkt%29._pg-circle%29%29" class="RktValDef RktValLink" data-pltdoc="x">pg-circle</a></span></span><span class="stt"> </span><span class="RktPn">(</span><span class="RktSym">center</span><span class="stt"> </span><span class="RktSym">radius</span><span class="RktPn">)</span><span class="RktPn">)</span></p></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktSym">center</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._db%2Futil%2Fgeometry..rkt%29._point~3f%29%29" class="RktValLink" data-pltdoc="x">point?</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktSym">radius</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=number-types.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._real%7E3f%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">real?</a></span></td></tr></table></td></tr></table></blockquote></div><div class="SIntrapara">These structures represent certain of PostgreSQL’s built-in geometric
types that have no appropriate analogue in the OpenGIS model:
<span class="stt">box</span>, <span class="stt">path</span>, and <span class="stt">circle</span>. The <span class="stt">point</span>, <span class="stt">lseg</span>, and
<span class="stt">polygon</span> PostgreSQL built-in types are represented using
<span class="RktSym"><a href="#%28def._%28%28lib._db%2Futil%2Fgeometry..rkt%29._point%29%29" class="RktValLink" data-pltdoc="x">point</a></span>, <span class="RktSym"><a href="#%28def._%28%28lib._db%2Futil%2Fgeometry..rkt%29._line-string%29%29" class="RktValLink" data-pltdoc="x">line-string</a></span> (<span class="RktSym"><a href="#%28def._%28%28lib._db%2Futil%2Fgeometry..rkt%29._line~3f%29%29" class="RktValLink" data-pltdoc="x">line?</a></span>), and
<span class="RktSym"><a href="#%28def._%28%28lib._db%2Futil%2Fgeometry..rkt%29._polygon%29%29" class="RktValLink" data-pltdoc="x">polygon</a></span> structures.</div></p><p>Note: PostgreSQL’s built-in geometric types are distinct from those
provided by the PostGIS extension library (see <a href="#%28part._geometry%29" data-pltdoc="x">Geometric Types</a>).</p><h4 x-source-module="(lib "db/scribblings/db.scrbl")" x-source-pkg="db-doc" x-part-tag=""util-testing"">5.4<tt> </tt><a name="(part._util-testing)"></a><a name="(mod-path._db/util/testing)"></a>Testing Database Programs</h4><p><table cellspacing="0" cellpadding="0" class="defmodule"><tr><td align="left"><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=require.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._require%2529%2529&version=6.7" class="RktStxLink Sq" data-pltdoc="x">require</a></span><span class="stt"> </span><a href="#%28mod-path._db%2Futil%2Ftesting%29" class="RktModLink" data-pltdoc="x"><span class="RktSym">db/util/testing</span></a><span class="RktPn">)</span></td><td align="right"><span class="RpackageSpec"><span class="Smaller"> package:</span> <span class="stt">db-lib</span></span></td></tr></table></p><p>This module provides utilities for testing programs that use database
connections.</p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><table cellspacing="0" cellpadding="0" class="prototype RForeground"><tr><td valign="top"><span class="RktPn">(</span><a name="(def._((lib._db/util/testing..rkt)._high-latency-connection))"></a><span title="Provided from: db/util/testing | Package: db-lib"><span class="RktSym"><a href="#%28def._%28%28lib._db%2Futil%2Ftesting..rkt%29._high-latency-connection%29%29" class="RktValDef RktValLink" data-pltdoc="x">high-latency-connection</a></span></span></td><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="RktVar">connection</span></td><td valign="top"><span class="hspace"> </span></td></tr><tr><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="RktVar">latency</span></td><td valign="top"><span class="hspace"> </span></td></tr><tr><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="hspace"> </span>[</td><td valign="top"><span class="RktPn">#:sleep-atomic?</span><span class="hspace"> </span><span class="RktVar">sleep-atomic?</span>]<span class="RktPn">)</span></td><td valign="top"><span class="hspace"> </span></td></tr></table></blockquote></td></tr><tr><td><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym"><a href="connect.html#%28def._%28%28lib._db%2Fbase..rkt%29._connection~3f%29%29" class="RktValLink" data-pltdoc="x">connection?</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">connection</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="connect.html#%28def._%28%28lib._db%2Fbase..rkt%29._connection~3f%29%29" class="RktValLink" data-pltdoc="x">connection?</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">latency</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._%7E3e%7E3d%252Fc%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">>=/c</a></span><span class="hspace"> </span><span class="RktVal">0</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">sleep-atomic?</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._any%252Fc%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">any/c</a></span><span class="hspace"> </span>=<span class="hspace"> </span><span class="RktVal">#f</span></td></tr></table></blockquote></div><div class="SIntrapara">Returns a proxy connection for <span class="RktVar">connection</span> that introduces
<span class="RktVar">latency</span> additional seconds of latency before operations that
require communicating with the database back end—<wbr></wbr><span class="RktSym"><a href="query-api.html#%28def._%28%28lib._db%2Fbase..rkt%29._prepare%29%29" class="RktValLink" data-pltdoc="x">prepare</a></span>,
<span class="RktSym"><a href="query-api.html#%28def._%28%28lib._db%2Fbase..rkt%29._query%29%29" class="RktValLink" data-pltdoc="x">query</a></span>, <span class="RktSym"><a href="query-api.html#%28def._%28%28lib._db%2Fbase..rkt%29._start-transaction%29%29" class="RktValLink" data-pltdoc="x">start-transaction</a></span>, etc.</div></p><p>Use this function in performance testing to roughly simulate
environments with high-latency communication with a database back
end.</p><p>If <span class="RktVar">sleep-atomic?</span> is true, then the proxy enters atomic mode
before sleeping, to better simulate the effect of a long-running FFI
call (see <a href="notes.html#%28part._ffi-concurrency%29" data-pltdoc="x">FFI-Based Connections and Concurrency</a>). Even so, it may not accurately
simulate an ODBC connection that internally uses cursors to fetch data
on demand, as each fetch would introduce additional latency.</p><div class="navsetbottom"><span class="navleft"><form class="searchform"><input class="searchbox" style="color: #888;" type="text" value="...search manuals..." title="Enter a search string to search the manuals" onkeypress="return DoSearchKey(event, this, "6.7", "../");" onfocus="this.style.color="black"; this.style.textAlign="left"; if (this.value == "...search manuals...") this.value="";" onblur="if (this.value.match(/^ *$/)) { this.style.color="#888"; this.style.textAlign="center"; this.value="...search manuals..."; }"/></form> <a href="../index.html" title="up to the documentation top" data-pltdoc="x" onclick="return GotoPLTRoot("6.7");">top</a></span><span class="navright"> <a href="sql-types.html" title="backward to "4 SQL Types and Conversions"" data-pltdoc="x">← prev</a> <a href="index.html" title="up to "DB: Database Connectivity"" data-pltdoc="x">up</a> <a href="notes.html" title="forward to "6 Notes"" data-pltdoc="x">next →</a></span> </div></div></div><div id="contextindicator"> </div></body></html>
|