Qore Programming Language Reference Manual: lib/QC_DatasourcePool.dox.h Source File

Qore Programming Language Reference Manual 0.8.11

- 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
55 nothing clearEventQueue();
56
57 public:
59
66 clearWarningCallback();
67
68 public:
70
76 nothing commit();
77
78 public:
80
101 constructor(string driver, *string user, *string pass, *string db, *string encoding, *string host, softint min = 3, softint max = 10, softint port = 0, *Qore::Thread::Queue queue, any arg);
102
103 public:
105
120 constructor(string desc, *Qore::Thread::Queue queue, any arg);
121
122 public:
124
145 constructor(hash opts, *Qore::Thread::Queue queue, any arg);
146
147 public:
149
154 copy();
155
156 public:
158
170 bool currentThreadInTransaction();
171
172 public:
174
181 destructor();
182
183 public:
185
199 any exec(string sql, ...);
200
201 public:
203
219 any execRaw(string sql);
220
221 public:
223
232 any getClientVersion();
233
234 public:
236
248 hash getConfigHash();
249
250 public:
252
264 string getConfigString();
265
266 public:
268
280 *string getDBCharset();
281
282 public:
284
296 string getDBEncoding();
297
298 public:
300
310 *string getDBName();
311
312 public:
314
324 string getDriverName();
325
326 public:
328
340 int getErrorTimeout();
341
342 public:
344
354 *string getHostName();
355
356 public:
358
369 int getMaximum();
370
371 public:
373
385 int getMinimum();
386
387 public:
389
401 string getOSCharset();
402
403 public:
405
415 *string getOSEncoding();
416
417 public:
419
428 any getOption(string opt);
429
430 public:
432
442 hash getOptionHash();
443
444 public:
446
456 *string getPassword();
457
458 public:
460
470 *int getPort();
471
472 public:
474
483 any getServerVersion();
484
485 public:
487
507 *hash getUsageInfo();
508
509 public:
511
521 *string getUserName();
522
523 public:
525
535 bool inTransaction();
536
537 public:
539
545 nothing rollback();
546
547 public:
549
578 any select(string sql, ...);
579
580 public:
582
602 any selectRow(string sql, ...);
603
604 public:
606
628 any selectRows(string sql, ...);
629
630 public:
632
639 setErrorTimeout(timeout ts);
640
641 public:
643
650 nothing setEventQueue(Qore::Thread::Queue queue, any arg);
651
652 public:
654
670 setWarningCallback(timeout ms, code callback, any arg);
671
672 public:
674
685 string toString();
686
687 public:
689
705 any vexec(string sql, *softlist vargs);
706
707 public:
709
735 any vselect(string sql, *softlist vargs);
736
737 public:
739
759 any vselectRow(string sql, *softlist vargs);
760
761 public:
763
787 any vselectRows(string sql, *softlist vargs);
788 };
789 };
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 "(unknown)" 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::clearEventQueue
nothing clearEventQueue()
Clears the queue object for DBI events on the pool.
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::getOptionHash
hash getOptionHash()
returns the valid options for the driver associated with the Datasource with descriptions and current...
Qore::SQL::DatasourcePool::getUsageInfo
*hash getUsageInfo()
Returns a hash with usage information about the DatasourcePool object.
Qore::SQL::DatasourcePool::getMinimum
int getMinimum()
Returns the minimum number of connections in this object.
Qore::SQL::DatasourcePool::clearWarningCallback
clearWarningCallback()
clears any connection delay warning callback from the 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::getErrorTimeout
int getErrorTimeout()
Returns the error timeout period for waiting for a connection to come free as an integer giving milli...
Qore::Thread::Queue
Queue objects provide a blocking, thread-safe message-passing object to Qore programs ...
Definition: QC_Queue.dox.h:13
Qore::SQL::DatasourcePool::setEventQueue
nothing setEventQueue(Qore::Thread::Queue queue, any arg)
Sets a queue object for DBI events on the pool.
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::setErrorTimeout
setErrorTimeout(timeout ts)
Sets the timeout period for waiting for a connection to come free; note that timeout values less than...
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::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, *Qore::Thread::Queue queue, any arg)
Creates the DatasourcePool object; attempts to load a DBI driver if the driver is not already present...
Qore::hash
hash hash(object obj)
Returns a hash of an object's members.
Qore::SQL::DatasourcePool::setWarningCallback
setWarningCallback(timeout ms, code callback, any arg)
sets a connection delay warning callback to be called any time the delay assigning a connection from ...