Qore Programming Language Reference Manual  0.8.12.2
 All Classes Namespaces Functions Variables Groups Pages
QC_DatasourcePool.dox.h
1 namespace Qore::SQL {
4 
42 
43 public:
45 
56 nothing beginTransaction();
57 
58 public:
60 
62 nothing clearEventQueue();
63 
64 public:
66 
74 
75 public:
77 
83 nothing commit();
84 
85 public:
87 
108  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);
109 
110 public:
112 
127  constructor(string desc, *Qore::Thread::Queue queue, any arg);
128 
129 public:
131 
152  constructor(hash opts, *Qore::Thread::Queue queue, any arg);
153 
154 public:
156 
161  copy();
162 
163 public:
165 
178 
179 public:
181 
188  destructor();
189 
190 public:
192 
206 any exec(string sql, ...);
207 
208 public:
210 
226 any execRaw(string sql);
227 
228 public:
230 
244 int getCapabilities();
245 
246 public:
248 
263 
264 public:
266 
275 any getClientVersion();
276 
277 public:
279 
292 
293 public:
295 
307 string getConfigString();
308 
309 public:
311 
323 *string getDBCharset();
324 
325 public:
327 
339 string getDBEncoding();
340 
341 public:
343 
353 *string getDBName();
354 
355 public:
357 
367 string getDriverName();
368 
369 public:
371 
383 int getErrorTimeout();
384 
385 public:
387 
397 *string getHostName();
398 
399 public:
401 
412 int getMaximum();
413 
414 public:
416 
428 int getMinimum();
429 
430 public:
432 
444 string getOSCharset();
445 
446 public:
448 
458 *string getOSEncoding();
459 
460 public:
462 
471 any getOption(string opt);
472 
473 public:
475 
486 
487 public:
489 
499 *string getPassword();
500 
501 public:
503 
513 *int getPort();
514 
515 public:
517 
526 any getServerVersion();
527 
528 public:
530 
550 *hash getUsageInfo();
551 
552 public:
554 
564 *string getUserName();
565 
566 public:
568 
578 bool inTransaction();
579 
580 public:
582 
588 nothing rollback();
589 
590 public:
592 
621 any select(string sql, ...);
622 
623 public:
625 
645 any selectRow(string sql, ...);
646 
647 public:
649 
671 any selectRows(string sql, ...);
672 
673 public:
675 
682  setErrorTimeout(timeout ts);
683 
684 public:
686 
693 nothing setEventQueue(Qore::Thread::Queue queue, any arg);
694 
695 public:
697 
713  setWarningCallback(timeout ms, code callback, any arg);
714 
715 public:
717 
728 string toString();
729 
730 public:
732 
748 any vexec(string sql, *softlist vargs);
749 
750 public:
752 
778 any vselect(string sql, *softlist vargs);
779 
780 public:
782 
802 any vselectRow(string sql, *softlist vargs);
803 
804 public:
806 
830 any vselectRows(string sql, *softlist vargs);
831 };
832 };
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:41
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.
list getCapabilityList()
Returns a list of strings giving the capabilities of the current DBI driver.
int getCapabilities()
Returns an integer bitfield of DBI driver capabilities.
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
list list(...)
Returns a list of the arguments passed at the top level.
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:15
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 ...