Qore Programming Language Reference Manual  0.8.9
 All Classes Namespaces Functions Variables Groups Pages
QC_DatasourcePool.dox.h
1 namespace Qore::SQL {
4 
35 
36 public:
38 
49 nothing beginTransaction();
50 
51 public:
53 
55 nothing clearEventQueue();
56 
57 public:
59 
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 
118  constructor(string desc, *Qore::Thread::Queue queue, any arg);
119 
120 public:
122 
141  constructor(hash opts, *Qore::Thread::Queue queue, any arg);
142 
143 public:
145 
150  copy();
151 
152 public:
154 
167 
168 public:
170 
177  destructor();
178 
179 public:
181 
195 any exec(string sql, ...);
196 
197 public:
199 
215 any execRaw(string sql);
216 
217 public:
219 
228 any getClientVersion();
229 
230 public:
232 
245 
246 public:
248 
260 string getConfigString();
261 
262 public:
264 
276 *string getDBCharset();
277 
278 public:
280 
292 string getDBEncoding();
293 
294 public:
296 
306 *string getDBName();
307 
308 public:
310 
320 string getDriverName();
321 
322 public:
324 
336 int getErrorTimeout();
337 
338 public:
340 
350 *string getHostName();
351 
352 public:
354 
365 int getMaximum();
366 
367 public:
369 
381 int getMinimum();
382 
383 public:
385 
397 string getOSCharset();
398 
399 public:
401 
411 *string getOSEncoding();
412 
413 public:
415 
424 any getOption(string opt);
425 
426 public:
428 
439 
440 public:
442 
452 *string getPassword();
453 
454 public:
456 
466 *int getPort();
467 
468 public:
470 
479 any getServerVersion();
480 
481 public:
483 
503 *hash getUsageInfo();
504 
505 public:
507 
517 *string getUserName();
518 
519 public:
521 
531 bool inTransaction();
532 
533 public:
535 
541 nothing rollback();
542 
543 public:
545 
574 any select(string sql, ...);
575 
576 public:
578 
598 any selectRow(string sql, ...);
599 
600 public:
602 
624 any selectRows(string sql, ...);
625 
626 public:
628 
635  setErrorTimeout(timeout ts);
636 
637 public:
639 
646 nothing setEventQueue(Qore::Thread::Queue queue, any arg);
647 
648 public:
650 
666  setWarningCallback(timeout ms, code callback, any arg);
667 
668 public:
670 
681 string toString();
682 
683 public:
685 
701 any vexec(string sql, *softlist vargs);
702 
703 public:
705 
731 any vselect(string sql, *softlist vargs);
732 
733 public:
735 
755 any vselectRow(string sql, *softlist vargs);
756 
757 public:
759 
783 any vselectRows(string sql, *softlist vargs);
784 };
785 };
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.
nothing clearEventQueue()
Clears the queue object for DBI events on the pool.
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)...
hash getOptionHash()
returns the valid options for the driver associated with the Datasource with descriptions and current...
*hash getUsageInfo()
Returns a hash with usage information about the DatasourcePool object.
int getMinimum()
Returns the minimum number of connections in this object.
clearWarningCallback()
clears any connection delay warning callback from the object
any selectRows(string sql,...)
Executes an SQL select statement on the server and returns the result as a list (rows) of hashes (the...
int getErrorTimeout()
Returns the error timeout period for waiting for a connection to come free as an integer giving milli...
Queue objects provide a blocking, thread-safe message-passing object to Qore programs ...
Definition: QC_Queue.dox.h:13
nothing setEventQueue(Qore::Thread::Queue queue, any arg)
Sets a queue object for DBI events on the pool.
*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...
setErrorTimeout(timeout ts)
Sets the timeout period for waiting for a connection to come free; note that timeout values less than...
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.
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...
hash hash(object obj)
Returns a hash of an object's members.
setWarningCallback(timeout ms, code callback, any arg)
sets a connection delay warning callback to be called any time the delay assigning a connection from ...