Qore Programming Language Reference Manual 1.19.2
Loading...
Searching...
No Matches
QC_DatasourcePool.dox.h
1
2namespace Qore {
4namespace SQL {
6
51
52public:
54
66
67public:
69
72
73public:
75
83
84public:
86
92nothing commit();
93
94public:
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
119public:
121
136 constructor(string desc, *Qore::Thread::Queue queue, auto arg);
137
138public:
140
161 constructor(hash<auto> opts, *Qore::Thread::Queue queue, auto arg);
162
163public:
165
171
172public:
174
187
188public:
190
198
199public:
201
215auto exec(string sql, ...);
216
217public:
219
235auto execRaw(string sql);
236
237public:
239
254
255public:
257
271list<auto> getCapabilityList();
272
273public:
275
285
286public:
288
300hash<auto> getConfigHash();
301
302public:
304
317
318public:
320
332*string getDBCharset();
333
334public:
336
349
350public:
352
362*string getDBName();
363
364public:
366
379
380public:
382
402
403public:
405
418
419public:
421
431*string getHostName();
432
433public:
435
447
448public:
450
463
464public:
466
479
480public:
482
493
494public:
496
505auto getOption(string opt);
506
507public:
509
519hash<auto> getOptionHash();
520
521public:
523
533*string getPassword();
534
535public:
537
547*int getPort();
548
549public:
551
561
562public:
564
574
575public:
577
597*hash<auto> getUsageInfo();
598
599public:
601
611*string getUserName();
612
613public:
615
626
627public:
629
635nothing rollback();
636
637public:
639
670auto select(string sql, ...);
671
672public:
674
694auto selectRow(string sql, ...);
695
696public:
698
720auto selectRows(string sql, ...);
721
722public:
724
731 setErrorTimeout(timeout ts);
732
733public:
735
742nothing setEventQueue(Qore::Thread::Queue queue, auto arg);
743
744public:
746
762 setWarningCallback(timeout ms, code callback, auto arg);
763
764public:
766
777string toString();
778
779public:
781
797auto vexec(string sql, *softlist<auto> vargs);
798
799public:
801
829auto vselect(string sql, *softlist<auto> vargs);
830
831public:
833
853auto vselectRow(string sql, *softlist<auto> vargs);
854
855public:
857
881auto vselectRows(string sql, *softlist<auto> vargs);
882};
883}
884}
This class defines an abstract interface for database access, inherited by both the Datasource and Da...
Definition: QC_AbstractDatasource.dox.h:10
This class defines an abstract interface for the SQLStatement class.
Definition: QC_AbstractSQLStatement.dox.h:11
Provides transparent per-thread, per-transaction datasource connection pooling.
Definition: QC_DatasourcePool.dox.h:50
string getDriverName()
Returns the name of the driver used for the object.
*hash< auto > getUsageInfo()
Returns a hash with usage information about the DatasourcePool object.
nothing beginTransaction()
Manually allocates a persistent connection from the pool to the calling thread.
*string getPassword()
Returns the password parameter as a string or NOTHING if none is set.
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 (...
string getConfigString()
Returns a string giving the configuration of the current object in a format that can be parsed by par...
setErrorTimeout(timeout ts)
Sets the timeout period for waiting for a connection to come free; note that timeout values less than...
hash< auto > getOptionHash()
returns the valid options for the driver associated with the Datasource with descriptions and current...
*string getHostName()
Returns the hostname parameter as a string or NOTHING if none is set.
constructor(string desc, *Qore::Thread::Queue queue, auto arg)
Creates a DatasourcePool object from a single string giving all parameters that can be parsed by pars...
nothing setEventQueue(Qore::Thread::Queue queue, auto arg)
Sets a queue object for DBI events on the pool.
bool inTransaction()
Returns True if a transaction is currently in progress (meaning in this case that a datasource form t...
auto execRaw(string sql)
Allocates a persistent connection to the current thread from the pool (if one has not already been al...
int getErrorTimeout()
Returns the error timeout period for waiting for a connection to come free as an integer giving milli...
auto getClientVersion()
Retrieves the driver-specific client library version information; this method may not be implemented ...
*string getDBName()
Returns the database name parameter as a string or NOTHING if none is set.
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)
Creates the DatasourcePool object; attempts to load a DBI driver if the driver is not already present...
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...
int getCapabilities()
Returns an integer bitfield of DBI driver capabilities.
nothing rollback()
Rolls back the current transaction and releases the connection to the pool.
*string getDBEncoding()
Retrieves the database-specific charset set encoding for the object.
*string getDBCharset()
Retrieves the database-specific charset set encoding for the object.
setWarningCallback(timeout ms, code callback, auto arg)
sets a connection delay warning callback to be called any time the delay assigning a connection from ...
*string getOSEncoding()
Returns the Qore character encoding name for the object as a string or NOTHING if none is set.
auto selectRows(string sql,...)
Executes an SQL select statement on the server and returns the result as a list (rows) of hashes (the...
auto getServerVersion()
Returns the driver-specific server version data for the current connection.
nothing commit()
Commits the current transaction and releases the connection to the pool.
*int getPort()
Gets the port number that will be used for the next connection to the server.
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 getUserName()
Returns the username parameter as a string or NOTHING if none is set.
int getMaximum()
Returns the maximum number of connections in this object.
int getMinimum()
Returns the minimum number of connections in this object.
string toString()
Returns a string with technical information about the object.
auto getOption(string opt)
Returns the current value for the given option.
constructor(hash< auto > opts, *Qore::Thread::Queue queue, auto arg)
Creates a DatasourcePool object from a hash argument giving parameters for the constructor.
auto selectRow(string sql,...)
Executes an SQL select statement on the server and returns the first row as a hash (the column values...
bool currentThreadInTransaction()
Returns True if the current thread is in a transaction (i.e. has a dedicated datasource allocation),...
auto select(string sql,...)
Executes an SQL select statement on the server and returns the result as a hash (column names) of lis...
nothing clearEventQueue()
Clears the queue object for DBI events on the pool.
string getDriverRealName()
Returns the real DB driver name if supported by the driver, otherwise the Qore driver name.
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 ...
hash< auto > getConfigHash()
Returns a datasource hash describing the configuration of the current object.
clearWarningCallback()
clears any connection delay warning callback from the object
list< auto > getCapabilityList()
Returns a list of strings giving the capabilities of the current DBI driver.
string getOSCharset()
Returns the Qore character encoding name for the object as a string or "(unknown)" if none is set.
destructor()
Throws an exception if any transactions are in progress and returns immediately; the object is destro...
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...
AbstractSQLStatement getSQLStatement()
Returns an AbstractSQLStatement object based on the current database connection object.
The Serializable class can be used to mark a class as being serializable.
Definition: QC_Serializable.dox.h:96
Queue objects provide a blocking, thread-safe message-passing object to Qore programs
Definition: QC_Queue.dox.h:22
auto max(list< auto > l)
Returns the maximum value in a list.
auto min(list< auto > l)
Returns the minumum value in a list.
Qore namespace.
Definition: QC_AbstractSmartLock.dox.h:2