pike.git
/
lib
/
modules
/
Sql.pmod
/
pgsql_util.pmod
version
»
Context lines:
10
20
40
80
file
none
3
pike.git/lib/modules/Sql.pmod/pgsql_util.pmod:1:
/* * Some pgsql utility functions. * They are kept here to avoid circular references. */
+
//! The pgsql backend, shared between all connection instances.
+
//! It even runs in non-callback mode.
+
#pike __REAL_VERSION__ #require constant(Thread.Thread) #include "pgsql.h"
-
//!
-
//! The pgsql backend, shared between all connection instances.
-
//! It even runs in non-callback mode.
-
//!
-
+
protected Thread.Mutex backendmux = Thread.Mutex(); final Pike.Backend local_backend = Pike.SmallBackend(); protected int clientsregistered; multiset cachealways=(<"BEGIN","begin","END","end","COMMIT","commit">); Regexp createprefix =Regexp("^[ \t\f\r\n]*[Cc][Rr][Ee][Aa][Tt][Ee][ \t\f\r\n]"); protected Regexp dontcacheprefix =Regexp("^[ \t\f\r\n]*([Ff][Ee][Tt][Cc][Hh]|[Cc][Oo][Pp][Yy])[ \t\f\r\n]"); protected Regexp execfetchlimit
pike.git/lib/modules/Sql.pmod/pgsql_util.pmod:88:
} return 0; // text } protected sctype mergemode(PGassist realbuffer,sctype mode) { if(mode>realbuffer->stashflushmode) realbuffer->stashflushmode=mode; return realbuffer->stashflushmode; }
-
//
!
Some pgsql utility functions
+
// Some pgsql utility functions
class PGplugbuffer { inherit Stdio.Buffer; protected PGassist realbuffer; protected void create(PGassist _realbuffer) { realbuffer=_realbuffer; }
pike.git/lib/modules/Sql.pmod/pgsql_util.pmod:824:
if(!datarow) datarow=_datarows->read_array(); if(arrayp(datarow[-1])) return datarow; trydelayederror(); eoffound=1; _datarows->write(1); // Signal EOF for other threads return (datarow=datarow[..<1]); }
-
//! @param
copydatasend
+
//! @param
copydata
//! When using COPY FROM STDIN, this method accepts a string or an //! array of strings to be processed by the COPY command; when sending //! the amount of data sent per call does not have to hit row or column //! boundaries. //! //! The COPY FROM STDIN sequence needs to be completed by either //! explicitly or implicitly destroying the result object, or by passing no //! argument to this method. //! //! @seealso