Qore Programming Language Reference Manual 0.8.8

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes

All Classes Namespaces Functions Variables Groups Pages
QC_DatasourcePool.dox.h
1 namespace Qore::SQL {
4
34 class DatasourcePool : public AbstractDatasource {
35
36 public:
38
49 nothing beginTransaction();
50
51 public:
53
59 nothing commit();
60
61 public:
63
82 constructor(string driver, *string user, *string pass, *string db, *string encoding, *string host, softint min = 3, softint max = 10, softint port = 0);
83
84 public:
86
99 constructor(string desc);
100
101 public:
103
122 constructor(hash opts);
123
124 public:
126
131 copy();
132
133 public:
135
147 bool currentThreadInTransaction();
148
149 public:
151
158 destructor();
159
160 public:
162
176 any exec(string sql, ...);
177
178 public:
180
196 any execRaw(string sql);
197
198 public:
200
209 any getClientVersion();
210
211 public:
213
225 hash getConfigHash();
226
227 public:
229
241 string getConfigString();
242
243 public:
245
257 *string getDBCharset();
258
259 public:
261
273 string getDBEncoding();
274
275 public:
277
287 *string getDBName();
288
289 public:
291
301 string getDriverName();
302
303 public:
305
315 *string getHostName();
316
317 public:
319
330 int getMaximum();
331
332 public:
334
346 int getMinimum();
347
348 public:
350
362 string getOSCharset();
363
364 public:
366
376 *string getOSEncoding();
377
378 public:
380
389 any getOption(string opt);
390
391 public:
393
403 hash getOptionHash();
404
405 public:
407
417 *string getPassword();
418
419 public:
421
431 *int getPort();
432
433 public:
435
444 any getServerVersion();
445
446 public:
448
458 *string getUserName();
459
460 public:
462
472 bool inTransaction();
473
474 public:
476
482 nothing rollback();
483
484 public:
486
515 any select(string sql, ...);
516
517 public:
519
539 any selectRow(string sql, ...);
540
541 public:
543
565 any selectRows(string sql, ...);
566
567 public:
569
580 string toString();
581
582 public:
584
600 any vexec(string sql, *softlist vargs);
601
602 public:
604
630 any vselect(string sql, *softlist vargs);
631
632 public:
634
654 any vselectRow(string sql, *softlist vargs);
655
656 public:
658
682 any vselectRows(string sql, *softlist vargs);
683 };
684 };
Qore::SQL::DatasourcePool::vselectRow
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...
Qore::SQL::DatasourcePool::getOSCharset
string getOSCharset()
Returns the Qore character encoding name for the object as a string or &quot;(unknown)&quot; if none is set...
Qore::SQL::DatasourcePool::getDriverName
string getDriverName()
Returns the name of the driver used for the object.
Qore::SQL::DatasourcePool::vselect
any vselect(string sql, *softlist vargs)
Executes a select statement on the server and returns the results in a hash (column names) of lists (...
Qore::SQL::DatasourcePool::getOSEncoding
*string getOSEncoding()
Returns the Qore character encoding name for the object as a string or NOTHING if none is set...
Qore::max
any max(list l)
Returns the maximum value in a list.
Qore::SQL::DatasourcePool::getOption
any getOption(string opt)
Returns the current value for the given option.
Qore::SQL::DatasourcePool::selectRow
any selectRow(string sql,...)
Executes an SQL select statement on the server and returns the first row as a hash (the column values...
Qore::SQL::DatasourcePool::getPassword
*string getPassword()
Returns the password parameter as a string or NOTHING if none is set.
Qore::SQL::DatasourcePool::getHostName
*string getHostName()
Returns the hostname parameter as a string or NOTHING if none is set.
Qore::SQL::DatasourcePool
Provides transparent per-thread, per-transaction datasource connection pooling.
Definition: QC_DatasourcePool.dox.h:34
Qore::SQL::DatasourcePool::vexec
any vexec(string sql, *softlist vargs)
Allocates a persistent connection to the current thread from the pool (if one has not already been al...
Qore::SQL::DatasourcePool::rollback
nothing rollback()
Rolls back the current transaction and releases the connection to the pool.
Qore::SQL::DatasourcePool::exec
any exec(string sql,...)
Allocates a persistent connection to the current thread from the pool (if one has not already been al...
Qore::SQL::DatasourcePool::getConfigString
string getConfigString()
Returns a string giving the configuration of the current object in a format that can be parsed by par...
Qore::SQL::DatasourcePool::copy
copy()
Creates a new Datasource object with the same driver as the original and copies of all the connection...
Qore::SQL::DatasourcePool::getClientVersion
any getClientVersion()
Retrieves the driver-specific client library version information; this method may not be implemented ...
Qore::SQL::DatasourcePool::vselectRows
any vselectRows(string sql, *softlist vargs)
Executes a select statement on the server and returns the results in a list (rows) of hashes (column ...
Qore::SQL::DatasourcePool::getPort
*int getPort()
Gets the port number that will be used for the next connection to the server.
Qore::SQL::AbstractDatasource
This class defines an abstract interface for database access, inherited by both the Datasource and Da...
Definition: QC_AbstractDatasource.dox.h:8
Qore::SQL::DatasourcePool::getDBEncoding
string getDBEncoding()
Retrieves the database-specific charset set encoding for the object.
Qore::SQL::DatasourcePool::getDBCharset
*string getDBCharset()
Retrieves the database-specific charset set encoding for the object.
Qore::SQL::DatasourcePool::inTransaction
bool inTransaction()
Returns True if a transaction is currently in progress (meaning in this case that a datasource form t...
Qore::SQL::DatasourcePool::commit
nothing commit()
Commits the current transaction and releases the connection to the pool.
Qore::SQL::DatasourcePool::toString
string toString()
Returns a string with technical information about the object.
Qore::SQL::DatasourcePool::getServerVersion
any getServerVersion()
Returns the driver-specific server version data for the current connection.
Qore::SQL::DatasourcePool::getDBName
*string getDBName()
Returns the database name parameter as a string or NOTHING if none is set.
Qore::min
any min(list l)
Returns the minumum value in a list.
Qore::SQL::DatasourcePool::getMaximum
int getMaximum()
Returns the maximum number of connections in this object.
Qore::SQL::DatasourcePool::execRaw
any execRaw(string sql)
Allocates a persistent connection to the current thread from the pool (if one has not already been al...
Qore::SQL::DatasourcePool::currentThreadInTransaction
bool currentThreadInTransaction()
Returns True if the current thread is in a transaction (i.e. has a dedicated datasource allocation)...
Qore::SQL::DatasourcePool::constructor
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...
Qore::SQL::DatasourcePool::getOptionHash
hash getOptionHash()
returns the valid options for the driver associated with the Datasource with descriptions and current...
Qore::SQL::DatasourcePool::getMinimum
int getMinimum()
Returns the minimum number of connections in this object.
Qore::SQL::DatasourcePool::selectRows
any selectRows(string sql,...)
Executes an SQL select statement on the server and returns the result as a list (rows) of hashes (the...
Qore::SQL::DatasourcePool::getUserName
*string getUserName()
Returns the username parameter as a string or NOTHING if none is set.
Qore::SQL::DatasourcePool::select
any select(string sql,...)
Executes an SQL select statement on the server and returns the result as a hash (column names) of lis...
Qore::SQL::DatasourcePool::destructor
destructor()
Throws an exception if any transactions are in progress and returns immediately; the object is destro...
Qore::SQL::DatasourcePool::getConfigHash
hash getConfigHash()
Returns a datasource hash describing the configuration of the current object.
Qore::SQL::DatasourcePool::beginTransaction
nothing beginTransaction()
Manually allocates a persistent connection from the pool to the calling thread.
Qore::hash
hash hash(object obj)
Returns a hash of an object&#39;s members.