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:285:
_datarows = ({ }); numrows = UNDEFINED; fetchmutex = Thread.Mutex(); _fetchlimit=fetchlimit; _portalbuffersize=portalbuffersize; _alltext = !alltyped; steallock(); } //! Returns the command-complete status for this query. //!
+
//! @seealso
+
//! @[affected_rows()]
+
//!
+
//! @note
//! This function is PostgreSQL-specific, and thus it is not available //! through the generic SQL-interface.
-
//!
-
//! @seealso
-
//! @[affected_rows]
+
string status_command_complete() { return _statuscmdcomplete; } //! Returns the number of affected rows by this query. //!
-
+
//! @seealso
+
//! @[status_command_complete()]
+
//!
+
//! @note
//! This function is PostgreSQL-specific, and thus it is not available //! through the generic SQL-interface.
-
//!
-
//! @seealso
-
//! @[status_command_complete]
+
int affected_rows() { int rows; if(_statuscmdcomplete) sscanf(_statuscmdcomplete,"%*s %d",rows); return rows; } int num_fields() { return sizeof(_datarowdesc); }
pike.git/lib/modules/Sql.pmod/pgsql_util.pmod:398:
//! 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 a //! zero argument to this method. //! //! @seealso
-
//! @[eof]
+
//! @[eof
()
]
int|array(mixed) fetch_row(void|int|string|array(string) buffer) { #ifndef NO_LOCKING Thread.MutexKey fetchmtxkey = fetchmutex.lock(); #endif if(!buffer && sizeof(_datarows)) return getdatarow(); if(copyinprogress) { fetchmtxkey = UNDEFINED; if(stringp(buffer) || arrayp(buffer)) { int totalsize=4;