82 constructor(
string driver, *
string user, *
string pass, *
string db, *
string encoding, *
string host, softint
min = 3, softint
max = 10, softint port = 0);
176 any
exec(
string sql, ...);
515 any
select(
string sql, ...);
600 any
vexec(
string sql, *softlist vargs);
630 any
vselect(
string sql, *softlist vargs);
any vselectRow(string sql, *softlist vargs)
Executes a select statement on the server and returns the first row as a hash (column names and value...
string getOSCharset()
Returns the Qore character encoding name for the object as a string or "(unknown)" if none is set...
string getDriverName()
Returns the name of the driver used for the object.
any vselect(string sql, *softlist vargs)
Executes a select statement on the server and returns the results in a hash (column names) of lists (...
*string getOSEncoding()
Returns the Qore character encoding name for the object as a string or NOTHING if none is set...
any max(list l)
Returns the maximum value in a list.
any getOption(string opt)
Returns the current value for the given option.
any selectRow(string sql,...)
Executes an SQL select statement on the server and returns the first row as a hash (the column values...
*string getPassword()
Returns the password parameter as a string or NOTHING if none is set.
*string getHostName()
Returns the hostname parameter as a string or NOTHING if none is set.
Provides transparent per-thread, per-transaction datasource connection pooling.
Definition: QC_DatasourcePool.dox.h:34
any vexec(string sql, *softlist vargs)
Allocates a persistent connection to the current thread from the pool (if one has not already been al...
nothing rollback()
Rolls back the current transaction and releases the connection to the pool.
any exec(string sql,...)
Allocates a persistent connection to the current thread from the pool (if one has not already been al...
string getConfigString()
Returns a string giving the configuration of the current object in a format that can be parsed by par...
copy()
Creates a new Datasource object with the same driver as the original and copies of all the connection...
any getClientVersion()
Retrieves the driver-specific client library version information; this method may not be implemented ...
any vselectRows(string sql, *softlist vargs)
Executes a select statement on the server and returns the results in a list (rows) of hashes (column ...
*int getPort()
Gets the port number that will be used for the next connection to the server.
This class defines an abstract interface for database access, inherited by both the Datasource and Da...
Definition: QC_AbstractDatasource.dox.h:8
string getDBEncoding()
Retrieves the database-specific charset set encoding for the object.
*string getDBCharset()
Retrieves the database-specific charset set encoding for the object.
bool inTransaction()
Returns True if a transaction is currently in progress (meaning in this case that a datasource form t...
nothing commit()
Commits the current transaction and releases the connection to the pool.
string toString()
Returns a string with technical information about the object.
any getServerVersion()
Returns the driver-specific server version data for the current connection.
*string getDBName()
Returns the database name parameter as a string or NOTHING if none is set.
any min(list l)
Returns the minumum value in a list.
int getMaximum()
Returns the maximum number of connections in this object.
any execRaw(string sql)
Allocates a persistent connection to the current thread from the pool (if one has not already been al...
bool currentThreadInTransaction()
Returns True if the current thread is in a transaction (i.e. has a dedicated datasource allocation)...
constructor(string driver, *string user, *string pass, *string db, *string encoding, *string host, softint min=3, softint max=10, softint port=0)
Creates the DatasourcePool object; attempts to load a DBI driver if the driver is not already present...
hash getOptionHash()
returns the valid options for the driver associated with the Datasource with descriptions and current...
int getMinimum()
Returns the minimum number of connections in this object.
any selectRows(string sql,...)
Executes an SQL select statement on the server and returns the result as a list (rows) of hashes (the...
*string getUserName()
Returns the username parameter as a string or NOTHING if none is set.
any select(string sql,...)
Executes an SQL select statement on the server and returns the result as a hash (column names) of lis...
destructor()
Throws an exception if any transactions are in progress and returns immediately; the object is destro...
hash getConfigHash()
Returns a datasource hash describing the configuration of the current object.
nothing beginTransaction()
Manually allocates a persistent connection from the pool to the calling thread.
hash hash(object obj)
Returns a hash of an object's members.