Qore Programming Language Reference Manual  0.9.2
QC_DatasourcePool.dox.h
1 namespace Qore::SQL {
4 
49 
50 public:
52 
63 nothing beginTransaction();
64 
65 public:
67 
69 nothing clearEventQueue();
70 
71 public:
73 
81 
82 public:
84 
90 nothing commit();
91 
92 public:
94 
115  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, auto arg);
116 
117 public:
119 
134  constructor(string desc, *Qore::Thread::Queue queue, auto arg);
135 
136 public:
138 
159  constructor(hash opts, *Qore::Thread::Queue queue, auto arg);
160 
161 public:
163 
168  copy();
169 
170 public:
172 
185 
186 public:
188 
195  destructor();
196 
197 public:
199 
213 auto exec(string sql, ...);
214 
215 public:
217 
233 auto execRaw(string sql);
234 
235 public:
237 
251 int getCapabilities();
252 
253 public:
255 
270 
271 public:
273 
282 auto getClientVersion();
283 
284 public:
286 
299 
300 public:
302 
314 string getConfigString();
315 
316 public:
318 
330 *string getDBCharset();
331 
332 public:
334 
346 string getDBEncoding();
347 
348 public:
350 
360 *string getDBName();
361 
362 public:
364 
374 string getDriverName();
375 
376 public:
378 
390 int getErrorTimeout();
391 
392 public:
394 
404 *string getHostName();
405 
406 public:
408 
419 int getMaximum();
420 
421 public:
423 
435 int getMinimum();
436 
437 public:
439 
451 string getOSCharset();
452 
453 public:
455 
465 *string getOSEncoding();
466 
467 public:
469 
478 auto getOption(string opt);
479 
480 public:
482 
493 
494 public:
496 
506 *string getPassword();
507 
508 public:
510 
520 *int getPort();
521 
522 public:
524 
534 
535 public:
537 
546 auto getServerVersion();
547 
548 public:
550 
570 *hash getUsageInfo();
571 
572 public:
574 
584 *string getUserName();
585 
586 public:
588 
598 bool inTransaction();
599 
600 public:
602 
608 nothing rollback();
609 
610 public:
612 
643 auto select(string sql, ...);
644 
645 public:
647 
667 auto selectRow(string sql, ...);
668 
669 public:
671 
693 auto selectRows(string sql, ...);
694 
695 public:
697 
704  setErrorTimeout(timeout ts);
705 
706 public:
708 
715 nothing setEventQueue(Qore::Thread::Queue queue, auto arg);
716 
717 public:
719 
735  setWarningCallback(timeout ms, code callback, auto arg);
736 
737 public:
739 
750 string toString();
751 
752 public:
754 
770 auto vexec(string sql, *softlist vargs);
771 
772 public:
774 
802 auto vselect(string sql, *softlist vargs);
803 
804 public:
806 
826 auto vselectRow(string sql, *softlist vargs);
827 
828 public:
830 
854 auto vselectRows(string sql, *softlist vargs);
855 };
856 };
This class defines an abstract interface for the SQLStatement class.
Definition: QC_AbstractSQLStatement.dox.h:9
string getOSCharset()
Returns the Qore character encoding name for the object as a string or "(unknown)" if none is set...
constructor()
The constructor does not perform any action; this class is just used to mark a class as serializable ...
string getDriverName()
Returns the name of the driver used for the object.
nothing setEventQueue(Qore::Thread::Queue queue, auto arg)
Sets a queue object for DBI events on the pool.
*string getOSEncoding()
Returns the Qore character encoding name for the object as a string or NOTHING if none is set...
*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:48
auto execRaw(string sql)
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.
Qore::SQL namespace.
Definition: QC_AbstractDatasource.dox.h:2
int getCapabilities()
Returns an integer bitfield of DBI driver capabilities.
auto selectRows(string sql,...)
Executes an SQL select statement on the server and returns the result as a list (rows) of hashes (the...
auto selectRow(string sql,...)
Executes an SQL select statement on the server and returns the first row as a hash (the column values...
auto vexec(string sql, *softlist vargs)
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...
auto exec(string sql,...)
Allocates a persistent connection to the current thread from the pool (if one has not already been al...
The Serializable class can be used to mark a class as being serializable.
Definition: QC_Serializable.dox.h:90
auto max(list l)
Returns the maximum value in a list.
*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 an untyped 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.
*string getDBName()
Returns the database name parameter as a string or NOTHING if none is set.
auto 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.
bool currentThreadInTransaction()
Returns True if the current thread is in a transaction (i.e. has a dedicated datasource allocation)...
auto getClientVersion()
Retrieves the driver-specific client library version information; this method may not be implemented ...
setWarningCallback(timeout ms, code callback, auto arg)
sets a connection delay warning callback to be called any time the delay assigning a connection from ...
hash getOptionHash()
returns the valid options for the driver associated with the Datasource with descriptions and current...
auto vselect(string sql, *softlist vargs)
Executes a select statement on the server and returns the results in a hash (column names) of lists (...
*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
auto getServerVersion()
Returns the driver-specific server version data for the current connection.
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
auto getOption(string opt)
Returns the current value for the given option.
*string getUserName()
Returns the username parameter as a string or NOTHING if none is set.
auto vselectRows(string sql, *softlist vargs)
Executes a select statement on the server and returns the results in a list (rows) of hashes (column ...
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.
hash hash(object obj)
Returns a hash of an object's members.
auto vselectRow(string sql, *softlist vargs)
Executes a select statement on the server and returns the first row as a hash (column names and value...
auto select(string sql,...)
Executes an SQL select statement on the server and returns the result as a hash (column names) of lis...
AbstractSQLStatement getSQLStatement()
Returns an AbstractSQLStatement object based on the current database connection object.