pike.git
/
lib
/
modules
/
Sql.pmod
/
pgsql.pike
version
»
Context lines:
10
20
40
80
file
none
3
pike.git/lib/modules/Sql.pmod/pgsql.pike:1674:
//! //! Bindings are supported natively straight across the network. //! Special bindings supported are: //! @mapping //! @member int ":_cache" //! Forces caching on or off for the query at hand. //! @member int ":_text" //! Forces text mode in communication with the database for queries on or off //! for the query at hand. Potentially more efficient than the default //! binary method for simple queries with small or no result sets.
+
//! Note that this mode causes all but the first query result of a list
+
//! of semicolon separated statements to be discarded.
//! @endmapping //! //! @returns //! A @[Sql.pgsql_util.pgsql_result] object (which conforms to the //! @[Sql.sql_result] standard interface for accessing data). It is //! recommended to use @[Sql.Sql()->query()] for simpler queries (because //! it is easier to handle, but stores all the result in memory), and //! @[Sql.Sql()->big_query()] for queries you expect to return huge amounts of //! data (it's harder to handle, but fetches results on demand). //!
pike.git/lib/modules/Sql.pmod/pgsql.pike:1814:
} } if(sizeof(plugbuf)) { _c.sendcmd(plugbuf,1); // close expireds PD("%O\n",plugbuf); } tstart=gethrtime(); } // pgsql_result autoassigns to portal else tp=UNDEFINED;
-
connectionclosed=0;
+
for(;;)
-
{ .pgsql_util.pgsql_result(this,q,_fetchlimit,
+
{
connectionclosed=0;
+
.pgsql_util.pgsql_result(this,q,_fetchlimit,
portalbuffersize,_alltyped,from,forcetext); if(unnamedportalinuse) portalname=PORTALPREFIX+(string)pportalcount++; else unnamedportalinuse++; _c.portal->_portalname=portalname; qstate=inquery; portalsinflight++; portalsopened++; clearmessage=1; mixed err;