Qore Programming Language Reference Manual  1.0.8
QC_DatasourcePool.dox.h
1 namespace Qore {
4 namespace SQL {
6 
51 
52 public:
54 
65 nothing beginTransaction();
66 
67 public:
69 
71 nothing clearEventQueue();
72 
73 public:
75 
83 
84 public:
86 
92 nothing commit();
93 
94 public:
96 
117  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);
118 
119 public:
121 
136  constructor(string desc, *Qore::Thread::Queue queue, auto arg);
137 
138 public:
140 
161  constructor(hash<auto> opts, *Qore::Thread::Queue queue, auto arg);
162 
163 public:
165 
170  copy();
171 
172 public:
174 
187 
188 public:
190 
197  destructor();
198 
199 public:
201 
215 auto exec(string sql, ...);
216 
217 public:
219 
235 auto execRaw(string sql);
236 
237 public:
239 
253 int getCapabilities();
254 
255 public:
257 
271 list<auto> getCapabilityList();
272 
273 public:
275 
284 auto getClientVersion();
285 
286 public:
288 
300 hash<auto> getConfigHash();
301 
302 public:
304 
316 string getConfigString();
317 
318 public:
320 
332 *string getDBCharset();
333 
334 public:
336 
348 *string getDBEncoding();
349 
350 public:
352 
362 *string getDBName();
363 
364 public:
366 
376 string getDriverName();
377 
378 public:
380 
392 int getErrorTimeout();
393 
394 public:
396 
406 *string getHostName();
407 
408 public:
410 
421 int getMaximum();
422 
423 public:
425 
437 int getMinimum();
438 
439 public:
441 
453 string getOSCharset();
454 
455 public:
457 
467 *string getOSEncoding();
468 
469 public:
471 
480 auto getOption(string opt);
481 
482 public:
484 
494 hash<auto> getOptionHash();
495 
496 public:
498 
508 *string getPassword();
509 
510 public:
512 
522 *int getPort();
523 
524 public:
526 
536 
537 public:
539 
548 auto getServerVersion();
549 
550 public:
552 
572 *hash<auto> getUsageInfo();
573 
574 public:
576 
586 *string getUserName();
587 
588 public:
590 
600 bool inTransaction();
601 
602 public:
604 
610 nothing rollback();
611 
612 public:
614 
645 auto select(string sql, ...);
646 
647 public:
649 
669 auto selectRow(string sql, ...);
670 
671 public:
673 
695 auto selectRows(string sql, ...);
696 
697 public:
699 
706  setErrorTimeout(timeout ts);
707 
708 public:
710 
717 nothing setEventQueue(Qore::Thread::Queue queue, auto arg);
718 
719 public:
721 
737  setWarningCallback(timeout ms, code callback, auto arg);
738 
739 public:
741 
752 string toString();
753 
754 public:
756 
772 auto vexec(string sql, *softlist<auto> vargs);
773 
774 public:
776 
804 auto vselect(string sql, *softlist<auto> vargs);
805 
806 public:
808 
828 auto vselectRow(string sql, *softlist<auto> vargs);
829 
830 public:
832 
856 auto vselectRows(string sql, *softlist<auto> vargs);
857 };
858 }
859 }
This class defines an abstract interface for the SQLStatement class.
Definition: QC_AbstractSQLStatement.dox.h:11
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 getDBEncoding()
Retrieves the database-specific charset set encoding for the object.
string getDriverName()
Returns the name of the driver used for the object.
auto vselect(string sql, *softlist< auto > vargs)
Executes a select statement on the server and returns the results in a hash (column names) of lists (...
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:50
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.
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...
string getConfigString()
Returns a string giving the configuration of the current object in a format that can be parsed by par...
*hash< auto > getUsageInfo()
Returns a hash with usage information about the DatasourcePool object.
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:96
*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:10
auto max(list< auto > l)
Returns the maximum value in a list.
auto vselectRow(string sql, *softlist< auto > vargs)
Executes a select statement on the server and returns the first row as a hash (column names and value...
*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.
hash< auto > getOptionHash()
returns the valid options for the driver associated with the Datasource with descriptions and current...
string toString()
Returns a string with technical information about the object.
auto min(list< auto > l)
Returns the minumum value in a list.
*string getDBName()
Returns the database name parameter as a string or NOTHING if none is set.
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 ...
auto vexec(string sql, *softlist< auto > vargs)
Allocates a persistent connection to the current thread from the pool (if one has not already been al...
int getMinimum()
Returns the minimum number of connections in this object.
clearWarningCallback()
clears any connection delay warning callback from the object
auto vselectRows(string sql, *softlist< auto > vargs)
Executes a select statement on the server and returns the results in a list (rows) of hashes (column ...
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:22
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.
main Qore-language namespace
Definition: Pseudo_QC_All.dox.h:3
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...
nothing beginTransaction()
Manually allocates a persistent connection from the pool to the calling thread.
list< auto > getCapabilityList()
Returns a list of strings giving the capabilities of the current DBI driver.
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.
hash< auto > getConfigHash()
Returns a datasource hash describing the configuration of the current object.