\hypertarget{class_qore_1_1_s_q_l_1_1_datasource_pool}{}\section{Qore\+:\+:S\+QL\+:\+:Datasource\+Pool Class Reference}
\label{class_qore_1_1_s_q_l_1_1_datasource_pool}\index{Qore\+::\+S\+Q\+L\+::\+Datasource\+Pool@{Qore\+::\+S\+Q\+L\+::\+Datasource\+Pool}}


Provides transparent per-\/thread, per-\/transaction datasource connection pooling.  




Inheritance diagram for Qore\+:\+:S\+QL\+:\+:Datasource\+Pool\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{class_qore_1_1_s_q_l_1_1_datasource_pool__inherit__graph}
\end{center}
\end{figure}
\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
nothing \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_datasource_pool_a04c351f440ddfdbe79f9b4ef26608e6f}{begin\+Transaction}} ()
\begin{DoxyCompactList}\small\item\em Manually allocates a persistent connection from the pool to the calling thread. \end{DoxyCompactList}\item 
nothing \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_datasource_pool_ad10f884015b96adea7182c970ac6e1e3}{clear\+Event\+Queue}} ()
\begin{DoxyCompactList}\small\item\em Clears the queue object for D\+BI events on the pool. \end{DoxyCompactList}\item 
\mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_datasource_pool_ae3f91bf804ee55f47169b8ae9669ad40}{clear\+Warning\+Callback}} ()
\begin{DoxyCompactList}\small\item\em clears any connection delay warning callback from the object \end{DoxyCompactList}\item 
nothing \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_datasource_pool_a9919ad37d79e03e364bd41462c981aea}{commit}} ()
\begin{DoxyCompactList}\small\item\em Commits the current transaction and releases the connection to the pool. \end{DoxyCompactList}\item 
\mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_datasource_pool_a5cc4b6555af9eac46c8fc1a63ec0aff7}{constructor}} (\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} driver, \+\_\+\+\_\+7\+\_\+ \mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} user, \+\_\+\+\_\+7\+\_\+ \mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} pass, \+\_\+\+\_\+7\+\_\+ \mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} db, \+\_\+\+\_\+7\+\_\+ \mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} encoding, \+\_\+\+\_\+7\+\_\+ \mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} host, softint \mbox{\hyperlink{group__list__functions_ga82c657a31963077edb54dd9b54b4683a}{min}}=3, softint \mbox{\hyperlink{group__list__functions_ga67a04aa765442456f353bf8b38b50e0e}{max}}=10, softint port=0, \+\_\+\+\_\+7\+\_\+ \mbox{\hyperlink{class_qore_1_1_thread_1_1_queue}{Qore\+::\+Thread\+::\+Queue}} queue, auto arg)
\begin{DoxyCompactList}\small\item\em Creates the \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_datasource_pool}{Datasource\+Pool}} object; attempts to load a D\+BI driver if the driver is not already present in Qore. \end{DoxyCompactList}\item 
\mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_datasource_pool_a2f9eed01518ddcfa7a788acbc2d8303c}{constructor}} (\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} desc, \+\_\+\+\_\+7\+\_\+ \mbox{\hyperlink{class_qore_1_1_thread_1_1_queue}{Qore\+::\+Thread\+::\+Queue}} queue, auto arg)
\begin{DoxyCompactList}\small\item\em Creates a \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_datasource_pool}{Datasource\+Pool}} object from a single string giving all parameters that can be parsed by \mbox{\hyperlink{group__dbi__functions_ga6c3dab42570887656fc05f5a22eb370a}{parse\+\_\+datasource()}} \end{DoxyCompactList}\item 
\mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_datasource_pool_abfeb365709f224491b145c068dc31809}{constructor}} (\mbox{\hyperlink{group__type__conversion__functions_ga0231dbb472dd230310af7c7c34f56e92}{hash}}$<$ auto $>$ opts, \+\_\+\+\_\+7\+\_\+ \mbox{\hyperlink{class_qore_1_1_thread_1_1_queue}{Qore\+::\+Thread\+::\+Queue}} queue, auto arg)
\begin{DoxyCompactList}\small\item\em Creates a \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_datasource_pool}{Datasource\+Pool}} object from a hash argument giving parameters for the constructor. \end{DoxyCompactList}\item 
\mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_datasource_pool_a5dd026e94aff8eedf8820db9e83a2e56}{copy}} ()
\begin{DoxyCompactList}\small\item\em Creates a new \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_datasource}{Datasource}} object with the same driver as the original and copies of all the connection parameters. \end{DoxyCompactList}\item 
bool \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_datasource_pool_ac983fd7cd64d2de924113b8cb540ca11}{current\+Thread\+In\+Transaction}} ()
\begin{DoxyCompactList}\small\item\em Returns \mbox{\hyperlink{group__boolean__constants_ga3ba2df91713a6249449347131ea526c3}{True}} if the current thread is in a transaction (i.\+e. has a dedicated datasource allocation), \mbox{\hyperlink{group__boolean__constants_ga9da2b9a8003cd3788e48305f8a00540f}{False}} if not. \end{DoxyCompactList}\item 
\mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_datasource_pool_af27a22a3f441e4ef8727e32b9532a8c5}{destructor}} ()
\begin{DoxyCompactList}\small\item\em Throws an exception if any transactions are in progress and returns immediately; the object is destroyed after any in-\/progress requests are completed. \end{DoxyCompactList}\item 
auto \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_datasource_pool_a63735bf6bce9e84968a57786965163da}{exec}} (\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} sql,...)
\begin{DoxyCompactList}\small\item\em Allocates a persistent connection to the current thread from the pool (if one has not already been allocated) and executes an S\+QL command on the server and returns either the integer row count (for example, for updates, inserts, and deletes) or the data retrieved (for example, if a stored procedure is executed that returns values) \end{DoxyCompactList}\item 
auto \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_datasource_pool_a3e7e022470ddc471f045ab29ee25c4d7}{exec\+Raw}} (\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} sql)
\begin{DoxyCompactList}\small\item\em Allocates a persistent connection to the current thread from the pool (if one has not already been allocated) and executes an S\+QL command on the server and returns either the row count (for example, for updates and inserts) or the data retrieved (for example, if a stored procedure is executed that returns values) \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int}} \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_datasource_pool_a6b84d1a73d81d05158087517ae31bdfe}{get\+Capabilities}} ()
\begin{DoxyCompactList}\small\item\em Returns an integer bitfield of D\+BI driver capabilities. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__type__conversion__functions_ga4b52a1cbee7a3aed46c32cb0a938629c}{list}}$<$ auto $>$ \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_datasource_pool_a2689d495aa3dc819c2e928dc86ea9357}{get\+Capability\+List}} ()
\begin{DoxyCompactList}\small\item\em Returns a list of strings giving the capabilities of the current D\+BI driver. \end{DoxyCompactList}\item 
auto \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_datasource_pool_a4a5bff189485cb1a33e336f7880432dc}{get\+Client\+Version}} ()
\begin{DoxyCompactList}\small\item\em Retrieves the driver-\/specific client library version information; this method may not be implemented for all drivers. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__type__conversion__functions_ga0231dbb472dd230310af7c7c34f56e92}{hash}}$<$ auto $>$ \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_datasource_pool_a3bb2405fb47462198f771428226c12d7}{get\+Config\+Hash}} ()
\begin{DoxyCompactList}\small\item\em Returns a \mbox{\hyperlink{group__dbi__functions_datasource_hash}{datasource hash}} describing the configuration of the current object. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_datasource_pool_a1eddfff5b95e355b5608554975984307}{get\+Config\+String}} ()
\begin{DoxyCompactList}\small\item\em Returns a string giving the configuration of the current object in a format that can be parsed by \mbox{\hyperlink{group__dbi__functions_ga6c3dab42570887656fc05f5a22eb370a}{parse\+\_\+datasource()}} \end{DoxyCompactList}\item 
\+\_\+\+\_\+7\+\_\+ \mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_datasource_pool_a81fdc65a09a9c6637ae12945a49cee00}{get\+D\+B\+Charset}} ()
\begin{DoxyCompactList}\small\item\em Retrieves the database-\/specific charset set encoding for the object. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_datasource_pool_aaa0c4b7c8972b2578e9b78e257d8d1e2}{get\+D\+B\+Encoding}} ()
\begin{DoxyCompactList}\small\item\em Retrieves the database-\/specific charset set encoding for the object. \end{DoxyCompactList}\item 
\+\_\+\+\_\+7\+\_\+ \mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_datasource_pool_a5babda43969ce082f11eae6d9a21d581}{get\+D\+B\+Name}} ()
\begin{DoxyCompactList}\small\item\em Returns the database name parameter as a string or \mbox{\hyperlink{basic_data_types_nothing}{N\+O\+T\+H\+I\+NG}} if none is set. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_datasource_pool_a003bb3bb9f55224159f49c574d0d1464}{get\+Driver\+Name}} ()
\begin{DoxyCompactList}\small\item\em Returns the name of the driver used for the object. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int}} \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_datasource_pool_a4043aba7b45cce75a8962f38ac9c4249}{get\+Error\+Timeout}} ()
\begin{DoxyCompactList}\small\item\em Returns the error timeout period for waiting for a connection to come free as an integer giving milliseconds; note that timeout values less than or equal to zero mean that requests for a connection will wait indefinitely. \end{DoxyCompactList}\item 
\+\_\+\+\_\+7\+\_\+ \mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_datasource_pool_a293eaadc3ab98b9a57f9c155e5ed2221}{get\+Host\+Name}} ()
\begin{DoxyCompactList}\small\item\em Returns the hostname parameter as a string or \mbox{\hyperlink{basic_data_types_nothing}{N\+O\+T\+H\+I\+NG}} if none is set. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int}} \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_datasource_pool_ab432f1306dd112d426d64839f2c1a891}{get\+Maximum}} ()
\begin{DoxyCompactList}\small\item\em Returns the maximum number of connections in this object. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int}} \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_datasource_pool_ab5f806c9f6c6beb16bd0714b533d27fc}{get\+Minimum}} ()
\begin{DoxyCompactList}\small\item\em Returns the minimum number of connections in this object. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_datasource_pool_af07e9048d42519070a937beea07423fc}{get\+O\+S\+Charset}} ()
\begin{DoxyCompactList}\small\item\em Returns the Qore character encoding name for the object as a string or {\ttfamily \char`\"{}(unknown)\char`\"{}} if none is set. \end{DoxyCompactList}\item 
\+\_\+\+\_\+7\+\_\+ \mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_datasource_pool_a894276b97b76b3526516613f1182dee5}{get\+O\+S\+Encoding}} ()
\begin{DoxyCompactList}\small\item\em Returns the Qore character encoding name for the object as a string or \mbox{\hyperlink{basic_data_types_nothing}{N\+O\+T\+H\+I\+NG}} if none is set. \end{DoxyCompactList}\item 
auto \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_datasource_pool_abf16cc3f2c883bae4e0e6896e6ee2f69}{get\+Option}} (\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} opt)
\begin{DoxyCompactList}\small\item\em Returns the current value for the given option. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__type__conversion__functions_ga0231dbb472dd230310af7c7c34f56e92}{hash}}$<$ auto $>$ \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_datasource_pool_a7e229e19a615801165728ce76f88eb52}{get\+Option\+Hash}} ()
\begin{DoxyCompactList}\small\item\em returns the valid options for the driver associated with the \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_datasource}{Datasource}} with descriptions and current values for the current \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_datasource}{Datasource}} object \end{DoxyCompactList}\item 
\+\_\+\+\_\+7\+\_\+ \mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_datasource_pool_a09f75c1b73aa9971b2ae8cd57e1e38c0}{get\+Password}} ()
\begin{DoxyCompactList}\small\item\em Returns the password parameter as a string or \mbox{\hyperlink{basic_data_types_nothing}{N\+O\+T\+H\+I\+NG}} if none is set. \end{DoxyCompactList}\item 
\+\_\+\+\_\+7\+\_\+ \mbox{\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int}} \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_datasource_pool_a99935d80ec9ca0739ed3031ec614ce52}{get\+Port}} ()
\begin{DoxyCompactList}\small\item\em Gets the port number that will be used for the next connection to the server. \end{DoxyCompactList}\item 
\mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_abstract_s_q_l_statement}{Abstract\+S\+Q\+L\+Statement}} \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_datasource_pool_af59598025506fa7079b734018a89decf}{get\+S\+Q\+L\+Statement}} ()
\begin{DoxyCompactList}\small\item\em Returns an \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_abstract_s_q_l_statement}{Abstract\+S\+Q\+L\+Statement}} object based on the current database connection object. \end{DoxyCompactList}\item 
auto \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_datasource_pool_a953480807dbdafae0808a6c47014c0d6}{get\+Server\+Version}} ()
\begin{DoxyCompactList}\small\item\em Returns the driver-\/specific server version data for the current connection. \end{DoxyCompactList}\item 
\+\_\+\+\_\+7\+\_\+ \mbox{\hyperlink{group__type__conversion__functions_ga0231dbb472dd230310af7c7c34f56e92}{hash}}$<$ auto $>$ \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_datasource_pool_a8247564b5f796c196f6532603c27d244}{get\+Usage\+Info}} ()
\begin{DoxyCompactList}\small\item\em Returns a hash with usage information about the \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_datasource_pool}{Datasource\+Pool}} object. \end{DoxyCompactList}\item 
\+\_\+\+\_\+7\+\_\+ \mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_datasource_pool_aaf036746fb8d7c107b09d7288924b64b}{get\+User\+Name}} ()
\begin{DoxyCompactList}\small\item\em Returns the username parameter as a string or \mbox{\hyperlink{basic_data_types_nothing}{N\+O\+T\+H\+I\+NG}} if none is set. \end{DoxyCompactList}\item 
bool \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_datasource_pool_a3b868b40604c049b4bf78b121ede7c16}{in\+Transaction}} ()
\begin{DoxyCompactList}\small\item\em Returns \mbox{\hyperlink{group__boolean__constants_ga3ba2df91713a6249449347131ea526c3}{True}} if a transaction is currently in progress (meaning in this case that a datasource form the pool is dedicated to the calling thread), \mbox{\hyperlink{group__boolean__constants_ga9da2b9a8003cd3788e48305f8a00540f}{False}} if not. \end{DoxyCompactList}\item 
nothing \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_datasource_pool_a73532001be895a5a30cc58c5bfbe2c1c}{rollback}} ()
\begin{DoxyCompactList}\small\item\em Rolls back the current transaction and releases the connection to the pool. \end{DoxyCompactList}\item 
auto \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_datasource_pool_acafe45a0cf883bc51917e7a0bb8e77fd}{select}} (\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} sql,...)
\begin{DoxyCompactList}\small\item\em Executes an S\+QL select statement on the server and returns the result as a hash (column names) of lists (column values per row) \end{DoxyCompactList}\item 
auto \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_datasource_pool_ac194599669509211cc64e9caf0aa56b3}{select\+Row}} (\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} sql,...)
\begin{DoxyCompactList}\small\item\em Executes an S\+QL select statement on the server and returns the first row as a hash (the column values) \end{DoxyCompactList}\item 
auto \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_datasource_pool_a9298e44c0af5bb93330c929b47cde5c9}{select\+Rows}} (\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} sql,...)
\begin{DoxyCompactList}\small\item\em Executes an S\+QL select statement on the server and returns the result as a list (rows) of hashes (the column values) \end{DoxyCompactList}\item 
\mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_datasource_pool_a2347794ada3fa9c629e705b7d1e6ee56}{set\+Error\+Timeout}} (timeout ts)
\begin{DoxyCompactList}\small\item\em Sets the timeout period for waiting for a connection to come free; note that timeout values less than or equal to zero mean that requests for a connection will wait indefinitely. \end{DoxyCompactList}\item 
nothing \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_datasource_pool_a358c35bb971eccbdcf917b9c5e3bed19}{set\+Event\+Queue}} (\mbox{\hyperlink{class_qore_1_1_thread_1_1_queue}{Qore\+::\+Thread\+::\+Queue}} queue, auto arg)
\begin{DoxyCompactList}\small\item\em Sets a queue object for D\+BI events on the pool. \end{DoxyCompactList}\item 
\mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_datasource_pool_a8793cfc4c27420eda345f8a8d0224d6d}{set\+Warning\+Callback}} (timeout ms, code callback, auto arg)
\begin{DoxyCompactList}\small\item\em sets a connection delay warning callback to be called any time the delay assigning a connection from the pool exceeds the given timeout in milliseconds \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_datasource_pool_abbad1ff5e3fb76ffc76ca48eb097f615}{to\+String}} ()
\begin{DoxyCompactList}\small\item\em Returns a string with technical information about the object. \end{DoxyCompactList}\item 
auto \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_datasource_pool_af3013ed0756f9bfa1e7ddf5232e0bf7e}{vexec}} (\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} sql, \+\_\+\+\_\+7\+\_\+ softlist$<$ auto $>$ vargs)
\begin{DoxyCompactList}\small\item\em Allocates a persistent connection to the current thread from the pool (if one has not already been allocated) and executes S\+QL code on the DB connection, taking a list for all bind arguments. \end{DoxyCompactList}\item 
auto \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_datasource_pool_a1162ad06aa3f4fc5fb31531ef5ca624b}{vselect}} (\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} sql, \+\_\+\+\_\+7\+\_\+ softlist$<$ auto $>$ vargs)
\begin{DoxyCompactList}\small\item\em Executes a select statement on the server and returns the results in a hash (column names) of lists (column values per row), taking a list for all bind arguments. \end{DoxyCompactList}\item 
auto \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_datasource_pool_a9cfedca21f0be7698893b5e5cc5d394a}{vselect\+Row}} (\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} sql, \+\_\+\+\_\+7\+\_\+ softlist$<$ auto $>$ vargs)
\begin{DoxyCompactList}\small\item\em Executes a select statement on the server and returns the first row as a hash (column names and values), taking a list for all bind arguments. \end{DoxyCompactList}\item 
auto \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_datasource_pool_ae214619fc06c77270ed38e7c013538e9}{vselect\+Rows}} (\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} sql, \+\_\+\+\_\+7\+\_\+ softlist$<$ auto $>$ vargs)
\begin{DoxyCompactList}\small\item\em Executes a select statement on the server and returns the results in a list (rows) of hashes (column names and values), taking a list for all bind arguments. \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Additional Inherited Members}


\subsection{Detailed Description}
Provides transparent per-\/thread, per-\/transaction datasource connection pooling. 

\begin{DoxyParagraph}{Restrictions\+:}
\mbox{\hyperlink{group__parse__options_gac496a9d9bcf9d5c626c8c267c73a83bc}{Qore\+::\+P\+O\+\_\+\+N\+O\+\_\+\+D\+A\+T\+A\+B\+A\+SE}}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Overview}
In most cases, the Datasource\+Pool class can be used as a drop-\/in replacement for the \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_datasource}{Datasource}} class with autocommit disabled; when a transaction begins, a datasource will be automatically assigned to the calling thread, and it will only be released when a commit or rollback is called on the object. If no datasource is available, the calling thread will block until a datasource comes available.~\newline
~\newline
Note that the same principles apply to S\+QL and database driver usage as with the \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_datasource}{Datasource}} class, see the \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_datasource}{Datasource}} class documentation for more information.~\newline
~\newline
The Datasource\+Pool class uses Qore\textquotesingle{}s thread resource tracking infrastructure to raise an exception if a thread terminates while a connection is allocated to it. If Qore user code enters a transaction with a Datasource\+Pool object and the thread terminates without closing the transaction (via \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_datasource_pool_a9919ad37d79e03e364bd41462c981aea}{Datasource\+Pool\+::commit()}} or \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_datasource_pool_a73532001be895a5a30cc58c5bfbe2c1c}{Datasource\+Pool\+::rollback()}}), an exception will automatically be raised, the transaction will be rolled back, and the \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_datasource}{Datasource}} connection will be freed to the pool.
\end{DoxyParagraph}
\label{class_qore_1_1_s_q_l_1_1_datasource_pool_datasourcepool_connection_allocations}%
\Hypertarget{class_qore_1_1_s_q_l_1_1_datasource_pool_datasourcepool_connection_allocations}%
\begin{DoxyParagraph}{Datasource\+Pool Connection Allocations}
The following methods allocate a persistent connection to the calling thread\+:
\begin{DoxyItemize}
\item \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_datasource_pool_a63735bf6bce9e84968a57786965163da}{Datasource\+Pool\+::exec()}}
\item \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_datasource_pool_af3013ed0756f9bfa1e7ddf5232e0bf7e}{Datasource\+Pool\+::vexec()}}
\item \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_datasource_pool_a3e7e022470ddc471f045ab29ee25c4d7}{Datasource\+Pool\+::exec\+Raw()}}
\item \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_datasource_pool_a04c351f440ddfdbe79f9b4ef26608e6f}{Datasource\+Pool\+::begin\+Transaction()}}
\end{DoxyItemize}The connection is released to the pool when \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_datasource_pool_a9919ad37d79e03e364bd41462c981aea}{Datasource\+Pool\+::commit()}} or \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_datasource_pool_a73532001be895a5a30cc58c5bfbe2c1c}{Datasource\+Pool\+::rollback()}} are called (or in the case the thread terminates, in which case an exception is raised as well).~\newline
~\newline
To begin a transaction with one of the select methods (for example, with {\ttfamily \char`\"{}select for update\char`\"{}}), call \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_datasource_pool_a04c351f440ddfdbe79f9b4ef26608e6f}{Datasource\+Pool\+::begin\+Transaction()}} first to manually dedicate a \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_datasource}{Datasource}} to the thread before calling the select method. Otherwise statements that should be in the same transaction may be executed in different connections.~\newline
~\newline
Executing a Datasource\+Pool method while not in a transaction is realized by allocating a temporary connection to the calling thread which is re-\/released when the method returns. No explicit commits are executed by the class, therefore it is an error to execute transaction-\/relevant commands without first calling \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_datasource_pool_a63735bf6bce9e84968a57786965163da}{Datasource\+Pool\+::exec()}}, \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_datasource_pool_af3013ed0756f9bfa1e7ddf5232e0bf7e}{Datasource\+Pool\+::vexec()}}, \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_datasource_pool_a3e7e022470ddc471f045ab29ee25c4d7}{Datasource\+Pool\+::exec\+Raw()}}, or \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_datasource_pool_a04c351f440ddfdbe79f9b4ef26608e6f}{Datasource\+Pool\+::begin\+Transaction()}}.~\newline
~\newline
Note that the \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_s_q_l_statement}{S\+Q\+L\+Statement}} class also grabs allocates a persistent connection to the calling thread when executing if it is created using a Datasource\+Pool object in the constructor; when connections are returned to the pool, all \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_s_q_l_statement}{S\+Q\+L\+Statement}} objects using the allocated datasource are closed automatically; for more information see the \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_s_q_l_statement}{S\+Q\+L\+Statement}} class documentation.
\end{DoxyParagraph}
\begin{DoxyParagraph}{Thread Resource Handling}
The \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_datasource_pool}{Datasource\+Pool}} class manages connection allocations as a \mbox{\hyperlink{threading_thread_resources}{thread resource}}; if the connection is not released with a call to \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_datasource_pool_a9919ad37d79e03e364bd41462c981aea}{Datasource\+Pool\+:\+:commit()}} or \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_datasource_pool_a73532001be895a5a30cc58c5bfbe2c1c}{Datasource\+Pool\+:\+:rollback()}} when the thread exits (or when \mbox{\hyperlink{group__threading__functions_ga421dca39ccb55b191d5d09fd98c2075a}{Qore\+::throw\+\_\+thread\+\_\+resource\+\_\+exceptions()}} or \mbox{\hyperlink{group__threading__functions_ga4e62409b8a1b414276d033267e7299e4}{Qore\+::throw\+\_\+thread\+\_\+resource\+\_\+exceptions\+\_\+to\+\_\+mark()}} is called), the transaction is rolled back automatically and a {\ttfamily D\+A\+T\+A\+S\+O\+U\+R\+C\+E-\/\+T\+R\+A\+N\+S\+A\+C\+T\+I\+O\+N-\/\+E\+X\+C\+E\+P\+T\+I\+ON} exception is raised describing the situation.~\newline
~\newline
Being an builtin class, the \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_datasource_pool}{Datasource\+Pool}} class does not inherit \mbox{\hyperlink{class_qore_1_1_thread_1_1_abstract_thread_resource}{Abstract\+Thread\+Resource}} explicitly as a part of the exported A\+PI, and the internal \mbox{\hyperlink{class_qore_1_1_thread_1_1_abstract_thread_resource_a0431f7384991eaf6900ee3a952b57f87}{Abstract\+Thread\+Resource\+:\+:cleanup()}} method cannot be overridden or suppressed.
\end{DoxyParagraph}
\begin{DoxyParagraph}{Data Serialization}
The \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_datasource_pool}{Datasource\+Pool}} class supports \mbox{\hyperlink{class_qore_1_1_serializable}{data serialization}}; deserialization can fail if the database is not supported on or reachable from the target machine.
\end{DoxyParagraph}
When deserializing, any datasource event queue is lost; only the connection information is propagated in the deserialized copy.

\begin{DoxyNote}{Note}
This class is not available with the \mbox{\hyperlink{group__parse__options_gac496a9d9bcf9d5c626c8c267c73a83bc}{P\+O\+\_\+\+N\+O\+\_\+\+D\+A\+T\+A\+B\+A\+SE}} parse option
\end{DoxyNote}
\begin{DoxySeeAlso}{See also}
\href{../../modules/SqlUtil/html/index.html}{\tt Sql\+Util} for a high level database-\/independent A\+PI 
\end{DoxySeeAlso}


\subsection{Member Function Documentation}
\mbox{\Hypertarget{class_qore_1_1_s_q_l_1_1_datasource_pool_a04c351f440ddfdbe79f9b4ef26608e6f}\label{class_qore_1_1_s_q_l_1_1_datasource_pool_a04c351f440ddfdbe79f9b4ef26608e6f}} 
\index{Qore\+::\+S\+Q\+L\+::\+Datasource\+Pool@{Qore\+::\+S\+Q\+L\+::\+Datasource\+Pool}!begin\+Transaction@{begin\+Transaction}}
\index{begin\+Transaction@{begin\+Transaction}!Qore\+::\+S\+Q\+L\+::\+Datasource\+Pool@{Qore\+::\+S\+Q\+L\+::\+Datasource\+Pool}}
\subsubsection{\texorpdfstring{begin\+Transaction()}{beginTransaction()}}
{\footnotesize\ttfamily nothing Qore\+::\+S\+Q\+L\+::\+Datasource\+Pool\+::begin\+Transaction (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [virtual]}}



Manually allocates a persistent connection from the pool to the calling thread. 

This method should be called when a transaction will be started with a \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_datasource_pool_acafe45a0cf883bc51917e7a0bb8e77fd}{Datasource\+Pool\+::select()}} method (or \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_datasource_pool_a1162ad06aa3f4fc5fb31531ef5ca624b}{Datasource\+Pool\+::vselect()}}, etc).

This method does not make any communication with the server to start a transaction; it only allocates a persistent connection to the current thread in Qore.

To release the connection, call \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_datasource_pool_a9919ad37d79e03e364bd41462c981aea}{Datasource\+Pool\+::commit()}} or \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_datasource_pool_a73532001be895a5a30cc58c5bfbe2c1c}{Datasource\+Pool\+::rollback()}}

\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}
db.beginTransaction();
\end{DoxyCode}
 
\end{DoxyParagraph}


Implements \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_abstract_datasource_ab879515333fbb878b567d3f9a80e4ba8}{Qore\+::\+S\+Q\+L\+::\+Abstract\+Datasource}}.

\mbox{\Hypertarget{class_qore_1_1_s_q_l_1_1_datasource_pool_ad10f884015b96adea7182c970ac6e1e3}\label{class_qore_1_1_s_q_l_1_1_datasource_pool_ad10f884015b96adea7182c970ac6e1e3}} 
\index{Qore\+::\+S\+Q\+L\+::\+Datasource\+Pool@{Qore\+::\+S\+Q\+L\+::\+Datasource\+Pool}!clear\+Event\+Queue@{clear\+Event\+Queue}}
\index{clear\+Event\+Queue@{clear\+Event\+Queue}!Qore\+::\+S\+Q\+L\+::\+Datasource\+Pool@{Qore\+::\+S\+Q\+L\+::\+Datasource\+Pool}}
\subsubsection{\texorpdfstring{clear\+Event\+Queue()}{clearEventQueue()}}
{\footnotesize\ttfamily nothing Qore\+::\+S\+Q\+L\+::\+Datasource\+Pool\+::clear\+Event\+Queue (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



Clears the queue object for D\+BI events on the pool. 

\begin{DoxySince}{Since}
Qore 0.\+8.\+9 
\end{DoxySince}
\mbox{\Hypertarget{class_qore_1_1_s_q_l_1_1_datasource_pool_ae3f91bf804ee55f47169b8ae9669ad40}\label{class_qore_1_1_s_q_l_1_1_datasource_pool_ae3f91bf804ee55f47169b8ae9669ad40}} 
\index{Qore\+::\+S\+Q\+L\+::\+Datasource\+Pool@{Qore\+::\+S\+Q\+L\+::\+Datasource\+Pool}!clear\+Warning\+Callback@{clear\+Warning\+Callback}}
\index{clear\+Warning\+Callback@{clear\+Warning\+Callback}!Qore\+::\+S\+Q\+L\+::\+Datasource\+Pool@{Qore\+::\+S\+Q\+L\+::\+Datasource\+Pool}}
\subsubsection{\texorpdfstring{clear\+Warning\+Callback()}{clearWarningCallback()}}
{\footnotesize\ttfamily Qore\+::\+S\+Q\+L\+::\+Datasource\+Pool\+::clear\+Warning\+Callback (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



clears any connection delay warning callback from the object 

\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}
ds.clearWarningCallback();
\end{DoxyCode}

\end{DoxyParagraph}
\begin{DoxySince}{Since}
Qore 0.\+8.\+9 
\end{DoxySince}
\mbox{\Hypertarget{class_qore_1_1_s_q_l_1_1_datasource_pool_a9919ad37d79e03e364bd41462c981aea}\label{class_qore_1_1_s_q_l_1_1_datasource_pool_a9919ad37d79e03e364bd41462c981aea}} 
\index{Qore\+::\+S\+Q\+L\+::\+Datasource\+Pool@{Qore\+::\+S\+Q\+L\+::\+Datasource\+Pool}!commit@{commit}}
\index{commit@{commit}!Qore\+::\+S\+Q\+L\+::\+Datasource\+Pool@{Qore\+::\+S\+Q\+L\+::\+Datasource\+Pool}}
\subsubsection{\texorpdfstring{commit()}{commit()}}
{\footnotesize\ttfamily nothing Qore\+::\+S\+Q\+L\+::\+Datasource\+Pool\+::commit (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [virtual]}}



Commits the current transaction and releases the connection to the pool. 

\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}
db.commit();
\end{DoxyCode}
 
\end{DoxyParagraph}


Implements \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_abstract_datasource_a885eed5b3f805ec931f6b5c8fc165c8b}{Qore\+::\+S\+Q\+L\+::\+Abstract\+Datasource}}.

\mbox{\Hypertarget{class_qore_1_1_s_q_l_1_1_datasource_pool_a5cc4b6555af9eac46c8fc1a63ec0aff7}\label{class_qore_1_1_s_q_l_1_1_datasource_pool_a5cc4b6555af9eac46c8fc1a63ec0aff7}} 
\index{Qore\+::\+S\+Q\+L\+::\+Datasource\+Pool@{Qore\+::\+S\+Q\+L\+::\+Datasource\+Pool}!constructor@{constructor}}
\index{constructor@{constructor}!Qore\+::\+S\+Q\+L\+::\+Datasource\+Pool@{Qore\+::\+S\+Q\+L\+::\+Datasource\+Pool}}
\subsubsection{\texorpdfstring{constructor()}{constructor()}\hspace{0.1cm}{\footnotesize\ttfamily [1/3]}}
{\footnotesize\ttfamily Qore\+::\+S\+Q\+L\+::\+Datasource\+Pool\+::constructor (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}}}]{driver,  }\item[{\+\_\+\+\_\+7\+\_\+ \mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}}}]{user,  }\item[{\+\_\+\+\_\+7\+\_\+ \mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}}}]{pass,  }\item[{\+\_\+\+\_\+7\+\_\+ \mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}}}]{db,  }\item[{\+\_\+\+\_\+7\+\_\+ \mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}}}]{encoding,  }\item[{\+\_\+\+\_\+7\+\_\+ \mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}}}]{host,  }\item[{softint}]{min = {\ttfamily 3},  }\item[{softint}]{max = {\ttfamily 10},  }\item[{softint}]{port = {\ttfamily 0},  }\item[{\+\_\+\+\_\+7\+\_\+ \mbox{\hyperlink{class_qore_1_1_thread_1_1_queue}{Qore\+::\+Thread\+::\+Queue}}}]{queue,  }\item[{auto}]{arg }\end{DoxyParamCaption})}



Creates the \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_datasource_pool}{Datasource\+Pool}} object; attempts to load a D\+BI driver if the driver is not already present in Qore. 


\begin{DoxyParams}{Parameters}
{\em driver} & The name of the D\+BI driver for the \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_datasource}{Datasource}}. See \mbox{\hyperlink{group__sql__constants}{S\+QL Constants}} for builtin constants for D\+BI drivers shipped with Qore, or see the D\+BI driver documentation to use an add-\/on driver (this string should be the name of the driver to be loaded) \\
\hline
{\em user} & The user name for the new connection. Also see \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_datasource_a86c204c7e2b1cceb46ca1f7ffeb007cd}{Datasource\+::set\+User\+Name()}} for a method that allows this parameter to be set after the constructor. \\
\hline
{\em pass} & The password for the new connection. Also see \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_datasource_a1ecea098e3d8f0d256f088f85d8e4ae4}{Datasource\+::set\+Password()}} for a method that allows this parameter to be set after the constructor. \\
\hline
{\em db} & The database name for the new connection. Also see \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_datasource_aaf2c93ad25bf3046a1a6b230f6482665}{Datasource\+::set\+D\+B\+Name()}} for a method that allows this parameter to be set after the constructor. \\
\hline
{\em encoding} & The database-\/specific name of the \mbox{\hyperlink{character_encoding}{character encoding}} to use for the new connection. Also see \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_datasource_aa7559279ad45047f842fb9f9af7a025b}{Datasource\+::set\+D\+B\+Charset()}} for a method that allows this parameter to be set after the constructor. If no value is passed for this parameter, then the database character encoding corresponding to the \mbox{\hyperlink{character_encoding_default_encoding}{default character encoding}} will be used instead. \\
\hline
{\em host} & The host name for the new connection. Also see \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_datasource_a264ea9b1a20197fb4b9c2eaa972af7f3}{Datasource\+::set\+Host\+Name()}} for a method that allows this parameter to be set after the constructor. \\
\hline
{\em min} & The minimum number of connections in the pool (this number of connections is opened in the constructor) \\
\hline
{\em max} & The maximum number of connections in the pool (not more than this number of connections will be opened) \\
\hline
{\em port} & The port number for the new connection. Also see \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_datasource_a9c1dee4070b3ac1998bad8294307628b}{Datasource\+::set\+Port()}} for a method that allows this parameter to be set after the constructor. \\
\hline
{\em queue} & An optional \mbox{\hyperlink{class_qore_1_1_thread_1_1_queue}{Queue}} object to receive datasource events; note that the \mbox{\hyperlink{class_qore_1_1_thread_1_1_queue}{Queue}} passed cannot have any maximum size set or a {\ttfamily Q\+U\+E\+U\+E-\/\+E\+R\+R\+OR} will be thrown; passing \mbox{\hyperlink{basic_data_types_nothing}{N\+O\+T\+H\+I\+NG}} will clear any event queue \\
\hline
{\em arg} & an optional argument to be included in the {\ttfamily arg} key of datasource events\\
\hline
\end{DoxyParams}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}
DatasourcePool db(DSPGSQL, \textcolor{stringliteral}{"user"}, \textcolor{stringliteral}{"pass"}, \textcolor{stringliteral}{"database"}, \textcolor{stringliteral}{"utf8"}, \textcolor{stringliteral}{"localhost"}, 3, 10, 5432);
\end{DoxyCode}

\end{DoxyParagraph}

\begin{DoxyExceptions}{Exceptions}
{\em D\+A\+T\+A\+S\+O\+U\+R\+C\+E\+P\+O\+O\+L-\/\+U\+N\+S\+U\+P\+P\+O\+R\+T\+E\+D-\/\+D\+A\+T\+A\+B\+A\+SE} & D\+BI driver cannot be found \\
\hline
{\em D\+A\+T\+A\+S\+O\+U\+R\+C\+E\+P\+O\+O\+L-\/\+C\+O\+N\+S\+T\+R\+U\+C\+T\+O\+R-\/\+E\+R\+R\+OR} & invalid min, max, or port argument \\
\hline
{\em D\+B\+I-\/\+O\+P\+T\+I\+O\+N-\/\+E\+R\+R\+OR} & unknown or unsupported option passed to driver \\
\hline
\end{DoxyExceptions}
\mbox{\Hypertarget{class_qore_1_1_s_q_l_1_1_datasource_pool_a2f9eed01518ddcfa7a788acbc2d8303c}\label{class_qore_1_1_s_q_l_1_1_datasource_pool_a2f9eed01518ddcfa7a788acbc2d8303c}} 
\index{Qore\+::\+S\+Q\+L\+::\+Datasource\+Pool@{Qore\+::\+S\+Q\+L\+::\+Datasource\+Pool}!constructor@{constructor}}
\index{constructor@{constructor}!Qore\+::\+S\+Q\+L\+::\+Datasource\+Pool@{Qore\+::\+S\+Q\+L\+::\+Datasource\+Pool}}
\subsubsection{\texorpdfstring{constructor()}{constructor()}\hspace{0.1cm}{\footnotesize\ttfamily [2/3]}}
{\footnotesize\ttfamily Qore\+::\+S\+Q\+L\+::\+Datasource\+Pool\+::constructor (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}}}]{desc,  }\item[{\+\_\+\+\_\+7\+\_\+ \mbox{\hyperlink{class_qore_1_1_thread_1_1_queue}{Qore\+::\+Thread\+::\+Queue}}}]{queue,  }\item[{auto}]{arg }\end{DoxyParamCaption})}



Creates a \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_datasource_pool}{Datasource\+Pool}} object from a single string giving all parameters that can be parsed by \mbox{\hyperlink{group__dbi__functions_ga6c3dab42570887656fc05f5a22eb370a}{parse\+\_\+datasource()}} 


\begin{DoxyParams}{Parameters}
{\em desc} & a datasource description string in the format that can be parsed by \mbox{\hyperlink{group__dbi__functions_ga6c3dab42570887656fc05f5a22eb370a}{parse\+\_\+datasource()}} \\
\hline
{\em queue} & An optional \mbox{\hyperlink{class_qore_1_1_thread_1_1_queue}{Queue}} object to receive datasource events; note that the \mbox{\hyperlink{class_qore_1_1_thread_1_1_queue}{Queue}} passed cannot have any maximum size set or a {\ttfamily Q\+U\+E\+U\+E-\/\+E\+R\+R\+OR} will be thrown; passing \mbox{\hyperlink{basic_data_types_nothing}{N\+O\+T\+H\+I\+NG}} will clear any event queue \\
\hline
{\em arg} & an optional argument to be included in the {\ttfamily arg} key of datasource events\\
\hline
\end{DoxyParams}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}
DatasourcePool ds(\textcolor{stringliteral}{"pgsql:user/pass@db01(utf8)%localhost:5432"});
\end{DoxyCode}

\end{DoxyParagraph}

\begin{DoxyExceptions}{Exceptions}
{\em D\+A\+T\+A\+S\+O\+U\+R\+C\+E-\/\+U\+N\+S\+U\+P\+P\+O\+R\+T\+E\+D-\/\+D\+A\+T\+A\+B\+A\+SE} & D\+BI driver cannot be loaded \\
\hline
{\em D\+A\+T\+A\+S\+O\+U\+R\+C\+E-\/\+C\+O\+N\+S\+T\+R\+U\+C\+T\+O\+R-\/\+E\+R\+RO} & missing required parameter for connection; port value is $<$= 0 \\
\hline
{\em D\+B\+I-\/\+O\+P\+T\+I\+O\+N-\/\+E\+R\+R\+OR} & unknown or unsupported option passed to driver\\
\hline
\end{DoxyExceptions}
\begin{DoxySince}{Since}
Qore 0.\+8.\+6 
\end{DoxySince}
\mbox{\Hypertarget{class_qore_1_1_s_q_l_1_1_datasource_pool_abfeb365709f224491b145c068dc31809}\label{class_qore_1_1_s_q_l_1_1_datasource_pool_abfeb365709f224491b145c068dc31809}} 
\index{Qore\+::\+S\+Q\+L\+::\+Datasource\+Pool@{Qore\+::\+S\+Q\+L\+::\+Datasource\+Pool}!constructor@{constructor}}
\index{constructor@{constructor}!Qore\+::\+S\+Q\+L\+::\+Datasource\+Pool@{Qore\+::\+S\+Q\+L\+::\+Datasource\+Pool}}
\subsubsection{\texorpdfstring{constructor()}{constructor()}\hspace{0.1cm}{\footnotesize\ttfamily [3/3]}}
{\footnotesize\ttfamily Qore\+::\+S\+Q\+L\+::\+Datasource\+Pool\+::constructor (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__type__conversion__functions_ga0231dbb472dd230310af7c7c34f56e92}{hash}}$<$ auto $>$}]{opts,  }\item[{\+\_\+\+\_\+7\+\_\+ \mbox{\hyperlink{class_qore_1_1_thread_1_1_queue}{Qore\+::\+Thread\+::\+Queue}}}]{queue,  }\item[{auto}]{arg }\end{DoxyParamCaption})}



Creates a \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_datasource_pool}{Datasource\+Pool}} object from a hash argument giving parameters for the constructor. 


\begin{DoxyParams}{Parameters}
{\em opts} & a hash giving parameters for the new datasource with the following possible keys (the {\ttfamily \char`\"{}type\char`\"{}} key is mandatory, also usable with the output of the \mbox{\hyperlink{group__dbi__functions_ga6c3dab42570887656fc05f5a22eb370a}{parse\+\_\+datasource()}} function)\+:
\begin{DoxyItemize}
\item {\ttfamily type\+:} (\mbox{\hyperlink{data_type_declarations_string_or_nothing_type}{$\ast$string}}) The name of the database driver to use; this key is mandatory; if not present, an exception will be raised. See \mbox{\hyperlink{group__sql__constants}{S\+QL Constants}} for builtin constants for D\+BI drivers shipped with \mbox{\hyperlink{namespace_qore}{Qore}}, or see the D\+BI driver documentation to use an add-\/on driver (this string should be the name of the driver to be loaded)
\item {\ttfamily user\+:} (\mbox{\hyperlink{data_type_declarations_string_or_nothing_type}{$\ast$string}}) The user name for the new connection
\item {\ttfamily pass\+:} (\mbox{\hyperlink{data_type_declarations_string_or_nothing_type}{$\ast$string}}) The password for the new connection
\item {\ttfamily db\+:} (\mbox{\hyperlink{data_type_declarations_string_or_nothing_type}{$\ast$string}}) The database name for the new connection
\item {\ttfamily charset\+:} (\mbox{\hyperlink{data_type_declarations_string_or_nothing_type}{$\ast$string}}) The database-\/specific name of the character encoding to use for the new connection. Also see Datasource\+Pool\+::set\+D\+B\+Charset() for a method that allows this parameter to be set after the constructor. If no value is passed for this parameter, then the database character encoding corresponding to the default character encoding for the Qore process will be used instead.
\item {\ttfamily host\+:} (\mbox{\hyperlink{data_type_declarations_string_or_nothing_type}{$\ast$string}}) The host name for the new connection
\item {\ttfamily port\+:} (\mbox{\hyperlink{data_type_declarations_softint_type}{softint}}) The port number for the new connection
\item {\ttfamily options\+:} (\mbox{\hyperlink{data_type_declarations_hash_type}{hash}}) An optional hash having {\ttfamily \char`\"{}min\char`\"{}} and {\ttfamily \char`\"{}max\char`\"{}} keys giving the minimum and maximum number of connections in the pool, respectively; all other options will be passed to the database driver 
\end{DoxyItemize}\\
\hline
{\em queue} & An optional \mbox{\hyperlink{class_qore_1_1_thread_1_1_queue}{Queue}} object to receive datasource events; note that the \mbox{\hyperlink{class_qore_1_1_thread_1_1_queue}{Queue}} passed cannot have any maximum size set or a {\ttfamily Q\+U\+E\+U\+E-\/\+E\+R\+R\+OR} will be thrown; passing \mbox{\hyperlink{basic_data_types_nothing}{N\+O\+T\+H\+I\+NG}} will clear any event queue \\
\hline
{\em arg} & an optional argument to be included in the {\ttfamily arg} key of datasource events\\
\hline
\end{DoxyParams}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}
Datasource db((\textcolor{stringliteral}{"type"}: DSPGSQL, \textcolor{stringliteral}{"user"}: \textcolor{stringliteral}{"username"}, \textcolor{stringliteral}{"pass"}: \textcolor{stringliteral}{"password"}, \textcolor{stringliteral}{"db"}: \textcolor{stringliteral}{"database"}, \textcolor{stringliteral}{"charset"}: \textcolor{stringliteral}{"utf8"}
      , \textcolor{stringliteral}{"host"}: \textcolor{stringliteral}{"localhost"}, \textcolor{stringliteral}{"port"}: 5432, \textcolor{stringliteral}{"options"}: (\textcolor{stringliteral}{"min"}: 3, \textcolor{stringliteral}{"max"}: 10)));
\end{DoxyCode}

\end{DoxyParagraph}

\begin{DoxyExceptions}{Exceptions}
{\em D\+A\+T\+A\+S\+O\+U\+R\+C\+E\+P\+O\+O\+L-\/\+U\+N\+S\+U\+P\+P\+O\+R\+T\+E\+D-\/\+D\+A\+T\+A\+B\+A\+SE} & D\+BI driver cannot be loaded \\
\hline
{\em D\+A\+T\+A\+S\+O\+U\+R\+C\+E\+P\+O\+O\+L-\/\+C\+O\+N\+S\+T\+R\+U\+C\+T\+O\+R-\/\+E\+R\+R\+OR} & missing or invalid {\ttfamily \char`\"{}driver\char`\"{}} key, other key name not assigned to a string; {\ttfamily \char`\"{}port\char`\"{}} value is $<$= 0; invalid {\ttfamily \char`\"{}min\char`\"{}} or {\ttfamily \char`\"{}max\char`\"{}} keys \\
\hline
{\em D\+B\+I-\/\+O\+P\+T\+I\+O\+N-\/\+E\+R\+R\+OR} & unknown or unsupported option passed to driver \\
\hline
\end{DoxyExceptions}
\mbox{\Hypertarget{class_qore_1_1_s_q_l_1_1_datasource_pool_a5dd026e94aff8eedf8820db9e83a2e56}\label{class_qore_1_1_s_q_l_1_1_datasource_pool_a5dd026e94aff8eedf8820db9e83a2e56}} 
\index{Qore\+::\+S\+Q\+L\+::\+Datasource\+Pool@{Qore\+::\+S\+Q\+L\+::\+Datasource\+Pool}!copy@{copy}}
\index{copy@{copy}!Qore\+::\+S\+Q\+L\+::\+Datasource\+Pool@{Qore\+::\+S\+Q\+L\+::\+Datasource\+Pool}}
\subsubsection{\texorpdfstring{copy()}{copy()}}
{\footnotesize\ttfamily Qore\+::\+S\+Q\+L\+::\+Datasource\+Pool\+::copy (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



Creates a new \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_datasource}{Datasource}} object with the same driver as the original and copies of all the connection parameters. 

\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}
DatasourcePool new\_dsp = dsp.copy();
\end{DoxyCode}
 
\end{DoxyParagraph}
\mbox{\Hypertarget{class_qore_1_1_s_q_l_1_1_datasource_pool_ac983fd7cd64d2de924113b8cb540ca11}\label{class_qore_1_1_s_q_l_1_1_datasource_pool_ac983fd7cd64d2de924113b8cb540ca11}} 
\index{Qore\+::\+S\+Q\+L\+::\+Datasource\+Pool@{Qore\+::\+S\+Q\+L\+::\+Datasource\+Pool}!current\+Thread\+In\+Transaction@{current\+Thread\+In\+Transaction}}
\index{current\+Thread\+In\+Transaction@{current\+Thread\+In\+Transaction}!Qore\+::\+S\+Q\+L\+::\+Datasource\+Pool@{Qore\+::\+S\+Q\+L\+::\+Datasource\+Pool}}
\subsubsection{\texorpdfstring{current\+Thread\+In\+Transaction()}{currentThreadInTransaction()}}
{\footnotesize\ttfamily bool Qore\+::\+S\+Q\+L\+::\+Datasource\+Pool\+::current\+Thread\+In\+Transaction (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



Returns \mbox{\hyperlink{group__boolean__constants_ga3ba2df91713a6249449347131ea526c3}{True}} if the current thread is in a transaction (i.\+e. has a dedicated datasource allocation), \mbox{\hyperlink{group__boolean__constants_ga9da2b9a8003cd3788e48305f8a00540f}{False}} if not. 

\begin{DoxyReturn}{Returns}
\mbox{\hyperlink{group__boolean__constants_ga3ba2df91713a6249449347131ea526c3}{True}} if the current thread is in a transaction (i.\+e. has a dedicated datasource allocation), \mbox{\hyperlink{group__boolean__constants_ga9da2b9a8003cd3788e48305f8a00540f}{False}} if not
\end{DoxyReturn}
\begin{DoxyParagraph}{Code Flags\+:}
\mbox{\hyperlink{code_flags_CONSTANT}{C\+O\+N\+S\+T\+A\+NT}}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}
bool b = db.currentThreadInTransaction();
\end{DoxyCode}

\end{DoxyParagraph}
\begin{DoxySince}{Since}
Qore 0.\+8.\+7 
\end{DoxySince}
\mbox{\Hypertarget{class_qore_1_1_s_q_l_1_1_datasource_pool_af27a22a3f441e4ef8727e32b9532a8c5}\label{class_qore_1_1_s_q_l_1_1_datasource_pool_af27a22a3f441e4ef8727e32b9532a8c5}} 
\index{Qore\+::\+S\+Q\+L\+::\+Datasource\+Pool@{Qore\+::\+S\+Q\+L\+::\+Datasource\+Pool}!destructor@{destructor}}
\index{destructor@{destructor}!Qore\+::\+S\+Q\+L\+::\+Datasource\+Pool@{Qore\+::\+S\+Q\+L\+::\+Datasource\+Pool}}
\subsubsection{\texorpdfstring{destructor()}{destructor()}}
{\footnotesize\ttfamily Qore\+::\+S\+Q\+L\+::\+Datasource\+Pool\+::destructor (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



Throws an exception if any transactions are in progress and returns immediately; the object is destroyed after any in-\/progress requests are completed. 

\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}
delete db;
\end{DoxyCode}

\end{DoxyParagraph}

\begin{DoxyExceptions}{Exceptions}
{\em D\+A\+T\+A\+S\+O\+U\+R\+C\+E\+P\+O\+O\+L-\/\+E\+R\+R\+OR} & The destructor was called while a transaction was still in progress \\
\hline
\end{DoxyExceptions}
\mbox{\Hypertarget{class_qore_1_1_s_q_l_1_1_datasource_pool_a63735bf6bce9e84968a57786965163da}\label{class_qore_1_1_s_q_l_1_1_datasource_pool_a63735bf6bce9e84968a57786965163da}} 
\index{Qore\+::\+S\+Q\+L\+::\+Datasource\+Pool@{Qore\+::\+S\+Q\+L\+::\+Datasource\+Pool}!exec@{exec}}
\index{exec@{exec}!Qore\+::\+S\+Q\+L\+::\+Datasource\+Pool@{Qore\+::\+S\+Q\+L\+::\+Datasource\+Pool}}
\subsubsection{\texorpdfstring{exec()}{exec()}}
{\footnotesize\ttfamily auto Qore\+::\+S\+Q\+L\+::\+Datasource\+Pool\+::exec (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}}}]{sql,  }\item[{}]{... }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [virtual]}}



Allocates a persistent connection to the current thread from the pool (if one has not already been allocated) and executes an S\+QL command on the server and returns either the integer row count (for example, for updates, inserts, and deletes) or the data retrieved (for example, if a stored procedure is executed that returns values) 

This method also accepts all bind parameters ({\ttfamily \%d}, {\ttfamily \%v}, {\ttfamily \%s}, etc) as documented in \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_datasource_sql_binding}{Binding by Value and Placeholder}}


\begin{DoxyParams}{Parameters}
{\em sql} & The S\+QL command to execute on the server \\
\hline
{\em ...} & Include any values to be bound (using {\ttfamily \%v} in the command string) or placeholder specifications (using {\ttfamily \+:}{\itshape key\+\_\+name} in the command string) in order after the command string\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
The return value depends on the D\+BI driver; normally, for commands with placeholders, a hash is returned holding the values acquired from executing the S\+QL statement. For all other commands, normally an integer row count is returned. However, some D\+BI drivers also allow select statements to be executed through this interface, which would also return a hash (column names) of lists (values for each column).
\end{DoxyReturn}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}
int rows = db.exec(\textcolor{stringliteral}{"insert into table (varchar\_col, timestamp\_col, blob\_col, numeric\_col) values (%v, %v,
       %v, %d)"}, string, \mbox{\hyperlink{group__date__and__time__functions_ga23f067a4f82596346d4fef09782e1945}{now}}(), binary, 100);
\end{DoxyCode}

\end{DoxyParagraph}
\begin{DoxyNote}{Note}
see the documentation for the D\+BI driver being used for additional possible exceptions 
\end{DoxyNote}


Implements \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_abstract_datasource_a71cd33bd6be7230e8481b3b6a0d33892}{Qore\+::\+S\+Q\+L\+::\+Abstract\+Datasource}}.

\mbox{\Hypertarget{class_qore_1_1_s_q_l_1_1_datasource_pool_a3e7e022470ddc471f045ab29ee25c4d7}\label{class_qore_1_1_s_q_l_1_1_datasource_pool_a3e7e022470ddc471f045ab29ee25c4d7}} 
\index{Qore\+::\+S\+Q\+L\+::\+Datasource\+Pool@{Qore\+::\+S\+Q\+L\+::\+Datasource\+Pool}!exec\+Raw@{exec\+Raw}}
\index{exec\+Raw@{exec\+Raw}!Qore\+::\+S\+Q\+L\+::\+Datasource\+Pool@{Qore\+::\+S\+Q\+L\+::\+Datasource\+Pool}}
\subsubsection{\texorpdfstring{exec\+Raw()}{execRaw()}}
{\footnotesize\ttfamily auto Qore\+::\+S\+Q\+L\+::\+Datasource\+Pool\+::exec\+Raw (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}}}]{sql }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [virtual]}}



Allocates a persistent connection to the current thread from the pool (if one has not already been allocated) and executes an S\+QL command on the server and returns either the row count (for example, for updates and inserts) or the data retrieved (for example, if a stored procedure is executed that returns values) 

This method does not do any variable binding, so it\textquotesingle{}s useful for example for D\+DL statements etc

\begin{DoxyParagraph}{Warning\+:}
Using this method to execute pure dynamic S\+QL many times with different S\+QL strings (as opposed to using the same string and binding by value instead of dynamic \mbox{\hyperlink{namespace_qore_1_1_s_q_l}{S\+QL}}) can affect application performance by prohibiting the efficient usage of the DB server\textquotesingle{}s statement cache. See DB server documentation for variable binding and the S\+QL statement cache for more information.
\end{DoxyParagraph}

\begin{DoxyParams}{Parameters}
{\em sql} & The S\+QL command to execute on the server; this string will not be subjected to any transformations for variable binding\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
The return value depends on the D\+BI driver; normally, for commands with placeholders, a hash is returned holding the values acquired from executing the S\+QL statement. For all other commands, normally an integer row count is returned. However, some D\+BI drivers also allow select statements to be executed through this interface, which would also return a hash (column names) of lists (values for each column).
\end{DoxyReturn}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}
db.execRaw(\textcolor{stringliteral}{"create table my\_tab (id number, some\_text varchar2(30))"});
\end{DoxyCode}

\end{DoxyParagraph}
\begin{DoxyNote}{Note}
see the documentation for the D\+BI driver being used for additional possible exceptions 
\end{DoxyNote}


Implements \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_abstract_datasource_a8ebf9c0e5bb529dab200ab95ab36a5d4}{Qore\+::\+S\+Q\+L\+::\+Abstract\+Datasource}}.

\mbox{\Hypertarget{class_qore_1_1_s_q_l_1_1_datasource_pool_a6b84d1a73d81d05158087517ae31bdfe}\label{class_qore_1_1_s_q_l_1_1_datasource_pool_a6b84d1a73d81d05158087517ae31bdfe}} 
\index{Qore\+::\+S\+Q\+L\+::\+Datasource\+Pool@{Qore\+::\+S\+Q\+L\+::\+Datasource\+Pool}!get\+Capabilities@{get\+Capabilities}}
\index{get\+Capabilities@{get\+Capabilities}!Qore\+::\+S\+Q\+L\+::\+Datasource\+Pool@{Qore\+::\+S\+Q\+L\+::\+Datasource\+Pool}}
\subsubsection{\texorpdfstring{get\+Capabilities()}{getCapabilities()}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int}} Qore\+::\+S\+Q\+L\+::\+Datasource\+Pool\+::get\+Capabilities (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



Returns an integer bitfield of D\+BI driver capabilities. 

\begin{DoxyReturn}{Returns}
an integer bitfield of D\+BI driver capabilities; see \mbox{\hyperlink{group__dbi__capabilities}{D\+BI Capability Constants}} for the meaning of each bit
\end{DoxyReturn}
\begin{DoxyParagraph}{Code Flags\+:}
\mbox{\hyperlink{code_flags_CONSTANT}{C\+O\+N\+S\+T\+A\+NT}}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}
int caps = pool.getCapabilities();
\textcolor{keywordflow}{if} (!(caps & DBI\_CAP\_TRANSACTION\_MANAGEMENT))
    throw \textcolor{stringliteral}{"DATASOURCE-ERROR"}, \mbox{\hyperlink{group__string__functions_ga7a74be141f814ef286046c367b21091c}{sprintf}}(\textcolor{stringliteral}{"DBI driver %y does not support transaction management"}, 
      db.getDriverName());
\end{DoxyCode}

\end{DoxyParagraph}
\begin{DoxySince}{Since}
Qore 0.\+8.\+12 
\end{DoxySince}
\mbox{\Hypertarget{class_qore_1_1_s_q_l_1_1_datasource_pool_a2689d495aa3dc819c2e928dc86ea9357}\label{class_qore_1_1_s_q_l_1_1_datasource_pool_a2689d495aa3dc819c2e928dc86ea9357}} 
\index{Qore\+::\+S\+Q\+L\+::\+Datasource\+Pool@{Qore\+::\+S\+Q\+L\+::\+Datasource\+Pool}!get\+Capability\+List@{get\+Capability\+List}}
\index{get\+Capability\+List@{get\+Capability\+List}!Qore\+::\+S\+Q\+L\+::\+Datasource\+Pool@{Qore\+::\+S\+Q\+L\+::\+Datasource\+Pool}}
\subsubsection{\texorpdfstring{get\+Capability\+List()}{getCapabilityList()}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__type__conversion__functions_ga4b52a1cbee7a3aed46c32cb0a938629c}{list}}$<$auto$>$ Qore\+::\+S\+Q\+L\+::\+Datasource\+Pool\+::get\+Capability\+List (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



Returns a list of strings giving the capabilities of the current D\+BI driver. 

\begin{DoxyReturn}{Returns}
a list of strings giving the capabilities of the current D\+BI driver
\end{DoxyReturn}
\begin{DoxyParagraph}{Code Flags\+:}
\mbox{\hyperlink{code_flags_CONSTANT}{C\+O\+N\+S\+T\+A\+NT}}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}
\mbox{\hyperlink{group__string__functions_ga32070517a9f8a70a32ef48f83a6f128e}{printf}}(\textcolor{stringliteral}{"driver %y has the following capabilities:\(\backslash\)n"}, db.getDriverName());
foreach string cap \textcolor{keywordflow}{in} (db.getCapabilityList())
    \mbox{\hyperlink{group__string__functions_ga32070517a9f8a70a32ef48f83a6f128e}{printf}}(\textcolor{stringliteral}{"- %s\(\backslash\)n"}, cap);
\end{DoxyCode}

\end{DoxyParagraph}
\begin{DoxySince}{Since}
Qore 0.\+8.\+12 
\end{DoxySince}
\mbox{\Hypertarget{class_qore_1_1_s_q_l_1_1_datasource_pool_a4a5bff189485cb1a33e336f7880432dc}\label{class_qore_1_1_s_q_l_1_1_datasource_pool_a4a5bff189485cb1a33e336f7880432dc}} 
\index{Qore\+::\+S\+Q\+L\+::\+Datasource\+Pool@{Qore\+::\+S\+Q\+L\+::\+Datasource\+Pool}!get\+Client\+Version@{get\+Client\+Version}}
\index{get\+Client\+Version@{get\+Client\+Version}!Qore\+::\+S\+Q\+L\+::\+Datasource\+Pool@{Qore\+::\+S\+Q\+L\+::\+Datasource\+Pool}}
\subsubsection{\texorpdfstring{get\+Client\+Version()}{getClientVersion()}}
{\footnotesize\ttfamily auto Qore\+::\+S\+Q\+L\+::\+Datasource\+Pool\+::get\+Client\+Version (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [virtual]}}



Retrieves the driver-\/specific client library version information; this method may not be implemented for all drivers. 

\begin{DoxyReturn}{Returns}
the driver-\/specific client library version information; this method may not be implemented for all drivers; see the D\+BI driver documentation for the return data type and format
\end{DoxyReturn}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}
auto ver = db.getClientVersion();
\end{DoxyCode}

\end{DoxyParagraph}
\begin{DoxyNote}{Note}
see the documentation for the D\+BI driver being used for possible exceptions 
\end{DoxyNote}


Implements \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_abstract_datasource_ad188ffb22d7cb8274fa8fa4255a28b8f}{Qore\+::\+S\+Q\+L\+::\+Abstract\+Datasource}}.

\mbox{\Hypertarget{class_qore_1_1_s_q_l_1_1_datasource_pool_a3bb2405fb47462198f771428226c12d7}\label{class_qore_1_1_s_q_l_1_1_datasource_pool_a3bb2405fb47462198f771428226c12d7}} 
\index{Qore\+::\+S\+Q\+L\+::\+Datasource\+Pool@{Qore\+::\+S\+Q\+L\+::\+Datasource\+Pool}!get\+Config\+Hash@{get\+Config\+Hash}}
\index{get\+Config\+Hash@{get\+Config\+Hash}!Qore\+::\+S\+Q\+L\+::\+Datasource\+Pool@{Qore\+::\+S\+Q\+L\+::\+Datasource\+Pool}}
\subsubsection{\texorpdfstring{get\+Config\+Hash()}{getConfigHash()}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__type__conversion__functions_ga0231dbb472dd230310af7c7c34f56e92}{hash}}$<$auto$>$ Qore\+::\+S\+Q\+L\+::\+Datasource\+Pool\+::get\+Config\+Hash (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [virtual]}}



Returns a \mbox{\hyperlink{group__dbi__functions_datasource_hash}{datasource hash}} describing the configuration of the current object. 

\begin{DoxyParagraph}{Code Flags\+:}
\mbox{\hyperlink{code_flags_CONSTANT}{C\+O\+N\+S\+T\+A\+NT}}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}
hash<auto> h = ds.getConfigHash();
\end{DoxyCode}

\end{DoxyParagraph}
\begin{DoxyReturn}{Returns}
a \mbox{\hyperlink{group__dbi__functions_datasource_hash}{datasource hash}} describing the configuration of the current object
\end{DoxyReturn}
\begin{DoxySince}{Since}
Qore 0.\+8.\+8 
\end{DoxySince}


Implements \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_abstract_datasource_a3929e6477e0d9da8155c0b0bf0d236cf}{Qore\+::\+S\+Q\+L\+::\+Abstract\+Datasource}}.

\mbox{\Hypertarget{class_qore_1_1_s_q_l_1_1_datasource_pool_a1eddfff5b95e355b5608554975984307}\label{class_qore_1_1_s_q_l_1_1_datasource_pool_a1eddfff5b95e355b5608554975984307}} 
\index{Qore\+::\+S\+Q\+L\+::\+Datasource\+Pool@{Qore\+::\+S\+Q\+L\+::\+Datasource\+Pool}!get\+Config\+String@{get\+Config\+String}}
\index{get\+Config\+String@{get\+Config\+String}!Qore\+::\+S\+Q\+L\+::\+Datasource\+Pool@{Qore\+::\+S\+Q\+L\+::\+Datasource\+Pool}}
\subsubsection{\texorpdfstring{get\+Config\+String()}{getConfigString()}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} Qore\+::\+S\+Q\+L\+::\+Datasource\+Pool\+::get\+Config\+String (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [virtual]}}



Returns a string giving the configuration of the current object in a format that can be parsed by \mbox{\hyperlink{group__dbi__functions_ga6c3dab42570887656fc05f5a22eb370a}{parse\+\_\+datasource()}} 

\begin{DoxyParagraph}{Code Flags\+:}
\mbox{\hyperlink{code_flags_CONSTANT}{C\+O\+N\+S\+T\+A\+NT}}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}
string str = ds.getConfigString();
\end{DoxyCode}

\end{DoxyParagraph}
\begin{DoxyReturn}{Returns}
a string giving the configuration of the current object in a format that can be parsed by \mbox{\hyperlink{group__dbi__functions_ga6c3dab42570887656fc05f5a22eb370a}{parse\+\_\+datasource()}}
\end{DoxyReturn}
\begin{DoxySince}{Since}
Qore 0.\+8.\+8 
\end{DoxySince}


Implements \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_abstract_datasource_a79772d8676975c1ab23710bc91d666ae}{Qore\+::\+S\+Q\+L\+::\+Abstract\+Datasource}}.

\mbox{\Hypertarget{class_qore_1_1_s_q_l_1_1_datasource_pool_a81fdc65a09a9c6637ae12945a49cee00}\label{class_qore_1_1_s_q_l_1_1_datasource_pool_a81fdc65a09a9c6637ae12945a49cee00}} 
\index{Qore\+::\+S\+Q\+L\+::\+Datasource\+Pool@{Qore\+::\+S\+Q\+L\+::\+Datasource\+Pool}!get\+D\+B\+Charset@{get\+D\+B\+Charset}}
\index{get\+D\+B\+Charset@{get\+D\+B\+Charset}!Qore\+::\+S\+Q\+L\+::\+Datasource\+Pool@{Qore\+::\+S\+Q\+L\+::\+Datasource\+Pool}}
\subsubsection{\texorpdfstring{get\+D\+B\+Charset()}{getDBCharset()}}
{\footnotesize\ttfamily \+\_\+\+\_\+7\+\_\+ \mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} Qore\+::\+S\+Q\+L\+::\+Datasource\+Pool\+::get\+D\+B\+Charset (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



Retrieves the database-\/specific charset set encoding for the object. 

A method synonym for \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_datasource_pool_aaa0c4b7c8972b2578e9b78e257d8d1e2}{Datasource\+Pool\+::get\+D\+B\+Encoding()}} kept for backwards-\/compatibility

\begin{DoxyReturn}{Returns}
the database-\/specific charset set encoding for the object
\end{DoxyReturn}
\begin{DoxyParagraph}{Code Flags\+:}
\mbox{\hyperlink{code_flags_CONSTANT}{C\+O\+N\+S\+T\+A\+NT}}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}
string enc = db.getDBCharset();
\end{DoxyCode}
 
\end{DoxyParagraph}
\mbox{\Hypertarget{class_qore_1_1_s_q_l_1_1_datasource_pool_aaa0c4b7c8972b2578e9b78e257d8d1e2}\label{class_qore_1_1_s_q_l_1_1_datasource_pool_aaa0c4b7c8972b2578e9b78e257d8d1e2}} 
\index{Qore\+::\+S\+Q\+L\+::\+Datasource\+Pool@{Qore\+::\+S\+Q\+L\+::\+Datasource\+Pool}!get\+D\+B\+Encoding@{get\+D\+B\+Encoding}}
\index{get\+D\+B\+Encoding@{get\+D\+B\+Encoding}!Qore\+::\+S\+Q\+L\+::\+Datasource\+Pool@{Qore\+::\+S\+Q\+L\+::\+Datasource\+Pool}}
\subsubsection{\texorpdfstring{get\+D\+B\+Encoding()}{getDBEncoding()}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} Qore\+::\+S\+Q\+L\+::\+Datasource\+Pool\+::get\+D\+B\+Encoding (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [virtual]}}



Retrieves the database-\/specific charset set encoding for the object. 

\begin{DoxyReturn}{Returns}
the database-\/specific charset set encoding for the object
\end{DoxyReturn}
\begin{DoxyParagraph}{Code Flags\+:}
\mbox{\hyperlink{code_flags_CONSTANT}{C\+O\+N\+S\+T\+A\+NT}}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}
string enc = db.getDBEncoding();
\end{DoxyCode}

\end{DoxyParagraph}
\begin{DoxySeeAlso}{See also}
\mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_datasource_pool_a894276b97b76b3526516613f1182dee5}{Datasource\+Pool\+::get\+O\+S\+Encoding()}} 
\end{DoxySeeAlso}


Implements \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_abstract_datasource_ae48205e644161ffd52fcbf10a8b75292}{Qore\+::\+S\+Q\+L\+::\+Abstract\+Datasource}}.

\mbox{\Hypertarget{class_qore_1_1_s_q_l_1_1_datasource_pool_a5babda43969ce082f11eae6d9a21d581}\label{class_qore_1_1_s_q_l_1_1_datasource_pool_a5babda43969ce082f11eae6d9a21d581}} 
\index{Qore\+::\+S\+Q\+L\+::\+Datasource\+Pool@{Qore\+::\+S\+Q\+L\+::\+Datasource\+Pool}!get\+D\+B\+Name@{get\+D\+B\+Name}}
\index{get\+D\+B\+Name@{get\+D\+B\+Name}!Qore\+::\+S\+Q\+L\+::\+Datasource\+Pool@{Qore\+::\+S\+Q\+L\+::\+Datasource\+Pool}}
\subsubsection{\texorpdfstring{get\+D\+B\+Name()}{getDBName()}}
{\footnotesize\ttfamily \+\_\+\+\_\+7\+\_\+ \mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} Qore\+::\+S\+Q\+L\+::\+Datasource\+Pool\+::get\+D\+B\+Name (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [virtual]}}



Returns the database name parameter as a string or \mbox{\hyperlink{basic_data_types_nothing}{N\+O\+T\+H\+I\+NG}} if none is set. 

\begin{DoxyReturn}{Returns}
the database name parameter as a string or \mbox{\hyperlink{basic_data_types_nothing}{N\+O\+T\+H\+I\+NG}} if none is set
\end{DoxyReturn}
\begin{DoxyParagraph}{Code Flags\+:}
\mbox{\hyperlink{code_flags_CONSTANT}{C\+O\+N\+S\+T\+A\+NT}}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}
*string db = db.getDBName();
\end{DoxyCode}
 
\end{DoxyParagraph}


Implements \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_abstract_datasource_a1e0d642801b1ce96fea0553ae4def964}{Qore\+::\+S\+Q\+L\+::\+Abstract\+Datasource}}.

\mbox{\Hypertarget{class_qore_1_1_s_q_l_1_1_datasource_pool_a003bb3bb9f55224159f49c574d0d1464}\label{class_qore_1_1_s_q_l_1_1_datasource_pool_a003bb3bb9f55224159f49c574d0d1464}} 
\index{Qore\+::\+S\+Q\+L\+::\+Datasource\+Pool@{Qore\+::\+S\+Q\+L\+::\+Datasource\+Pool}!get\+Driver\+Name@{get\+Driver\+Name}}
\index{get\+Driver\+Name@{get\+Driver\+Name}!Qore\+::\+S\+Q\+L\+::\+Datasource\+Pool@{Qore\+::\+S\+Q\+L\+::\+Datasource\+Pool}}
\subsubsection{\texorpdfstring{get\+Driver\+Name()}{getDriverName()}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} Qore\+::\+S\+Q\+L\+::\+Datasource\+Pool\+::get\+Driver\+Name (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [virtual]}}



Returns the name of the driver used for the object. 

\begin{DoxyReturn}{Returns}
the name of the driver used for the object
\end{DoxyReturn}
\begin{DoxyParagraph}{Code Flags\+:}
\mbox{\hyperlink{code_flags_CONSTANT}{C\+O\+N\+S\+T\+A\+NT}}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}
string driver = db.getDriverName();
\end{DoxyCode}
 
\end{DoxyParagraph}


Implements \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_abstract_datasource_a26a5370cb70baed85f0d3a51a8f36cf9}{Qore\+::\+S\+Q\+L\+::\+Abstract\+Datasource}}.

\mbox{\Hypertarget{class_qore_1_1_s_q_l_1_1_datasource_pool_a4043aba7b45cce75a8962f38ac9c4249}\label{class_qore_1_1_s_q_l_1_1_datasource_pool_a4043aba7b45cce75a8962f38ac9c4249}} 
\index{Qore\+::\+S\+Q\+L\+::\+Datasource\+Pool@{Qore\+::\+S\+Q\+L\+::\+Datasource\+Pool}!get\+Error\+Timeout@{get\+Error\+Timeout}}
\index{get\+Error\+Timeout@{get\+Error\+Timeout}!Qore\+::\+S\+Q\+L\+::\+Datasource\+Pool@{Qore\+::\+S\+Q\+L\+::\+Datasource\+Pool}}
\subsubsection{\texorpdfstring{get\+Error\+Timeout()}{getErrorTimeout()}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int}} Qore\+::\+S\+Q\+L\+::\+Datasource\+Pool\+::get\+Error\+Timeout (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



Returns the error timeout period for waiting for a connection to come free as an integer giving milliseconds; note that timeout values less than or equal to zero mean that requests for a connection will wait indefinitely. 

\begin{DoxyParagraph}{Code Flags\+:}
\mbox{\hyperlink{code_flags_CONSTANT}{C\+O\+N\+S\+T\+A\+NT}}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}
int ms = ds.getErrorTimeout();
\end{DoxyCode}

\end{DoxyParagraph}
\begin{DoxyReturn}{Returns}
the error timeout period for waiting for a connection to come free as an integer giving milliseconds; note that timeout values less than or equal to zero mean that requests for a connection will wait indefinitely
\end{DoxyReturn}
\begin{DoxySince}{Since}
Qore 0.\+8.\+9 
\end{DoxySince}
\mbox{\Hypertarget{class_qore_1_1_s_q_l_1_1_datasource_pool_a293eaadc3ab98b9a57f9c155e5ed2221}\label{class_qore_1_1_s_q_l_1_1_datasource_pool_a293eaadc3ab98b9a57f9c155e5ed2221}} 
\index{Qore\+::\+S\+Q\+L\+::\+Datasource\+Pool@{Qore\+::\+S\+Q\+L\+::\+Datasource\+Pool}!get\+Host\+Name@{get\+Host\+Name}}
\index{get\+Host\+Name@{get\+Host\+Name}!Qore\+::\+S\+Q\+L\+::\+Datasource\+Pool@{Qore\+::\+S\+Q\+L\+::\+Datasource\+Pool}}
\subsubsection{\texorpdfstring{get\+Host\+Name()}{getHostName()}}
{\footnotesize\ttfamily \+\_\+\+\_\+7\+\_\+ \mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} Qore\+::\+S\+Q\+L\+::\+Datasource\+Pool\+::get\+Host\+Name (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [virtual]}}



Returns the hostname parameter as a string or \mbox{\hyperlink{basic_data_types_nothing}{N\+O\+T\+H\+I\+NG}} if none is set. 

\begin{DoxyReturn}{Returns}
the hostname parameter as a string or \mbox{\hyperlink{basic_data_types_nothing}{N\+O\+T\+H\+I\+NG}} if none is set
\end{DoxyReturn}
\begin{DoxyParagraph}{Code Flags\+:}
\mbox{\hyperlink{code_flags_CONSTANT}{C\+O\+N\+S\+T\+A\+NT}}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}
*string host = db.getHostName();
\end{DoxyCode}
 
\end{DoxyParagraph}


Implements \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_abstract_datasource_a4ffcb9760eea609835734b27e7f97eac}{Qore\+::\+S\+Q\+L\+::\+Abstract\+Datasource}}.

\mbox{\Hypertarget{class_qore_1_1_s_q_l_1_1_datasource_pool_ab432f1306dd112d426d64839f2c1a891}\label{class_qore_1_1_s_q_l_1_1_datasource_pool_ab432f1306dd112d426d64839f2c1a891}} 
\index{Qore\+::\+S\+Q\+L\+::\+Datasource\+Pool@{Qore\+::\+S\+Q\+L\+::\+Datasource\+Pool}!get\+Maximum@{get\+Maximum}}
\index{get\+Maximum@{get\+Maximum}!Qore\+::\+S\+Q\+L\+::\+Datasource\+Pool@{Qore\+::\+S\+Q\+L\+::\+Datasource\+Pool}}
\subsubsection{\texorpdfstring{get\+Maximum()}{getMaximum()}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int}} Qore\+::\+S\+Q\+L\+::\+Datasource\+Pool\+::get\+Maximum (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



Returns the maximum number of connections in this object. 

\begin{DoxyReturn}{Returns}
the maximum number of connections in this object
\end{DoxyReturn}
\begin{DoxyParagraph}{Code Flags\+:}
\mbox{\hyperlink{code_flags_CONSTANT}{C\+O\+N\+S\+T\+A\+NT}}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}
int max = db.getMaximum();
\end{DoxyCode}
 
\end{DoxyParagraph}
\mbox{\Hypertarget{class_qore_1_1_s_q_l_1_1_datasource_pool_ab5f806c9f6c6beb16bd0714b533d27fc}\label{class_qore_1_1_s_q_l_1_1_datasource_pool_ab5f806c9f6c6beb16bd0714b533d27fc}} 
\index{Qore\+::\+S\+Q\+L\+::\+Datasource\+Pool@{Qore\+::\+S\+Q\+L\+::\+Datasource\+Pool}!get\+Minimum@{get\+Minimum}}
\index{get\+Minimum@{get\+Minimum}!Qore\+::\+S\+Q\+L\+::\+Datasource\+Pool@{Qore\+::\+S\+Q\+L\+::\+Datasource\+Pool}}
\subsubsection{\texorpdfstring{get\+Minimum()}{getMinimum()}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int}} Qore\+::\+S\+Q\+L\+::\+Datasource\+Pool\+::get\+Minimum (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



Returns the minimum number of connections in this object. 

\begin{DoxyReturn}{Returns}
the minimum number of connections in this object
\end{DoxyReturn}
\begin{DoxyParagraph}{Code Flags\+:}
\mbox{\hyperlink{code_flags_CONSTANT}{C\+O\+N\+S\+T\+A\+NT}}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Example\+:}
int min = db.\+get\+Minimum(); 
\begin{DoxyCode}
\end{DoxyCode}
 
\end{DoxyParagraph}
\mbox{\Hypertarget{class_qore_1_1_s_q_l_1_1_datasource_pool_abf16cc3f2c883bae4e0e6896e6ee2f69}\label{class_qore_1_1_s_q_l_1_1_datasource_pool_abf16cc3f2c883bae4e0e6896e6ee2f69}} 
\index{Qore\+::\+S\+Q\+L\+::\+Datasource\+Pool@{Qore\+::\+S\+Q\+L\+::\+Datasource\+Pool}!get\+Option@{get\+Option}}
\index{get\+Option@{get\+Option}!Qore\+::\+S\+Q\+L\+::\+Datasource\+Pool@{Qore\+::\+S\+Q\+L\+::\+Datasource\+Pool}}
\subsubsection{\texorpdfstring{get\+Option()}{getOption()}}
{\footnotesize\ttfamily auto Qore\+::\+S\+Q\+L\+::\+Datasource\+Pool\+::get\+Option (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}}}]{opt }\end{DoxyParamCaption})}



Returns the current value for the given option. 

\begin{DoxyParagraph}{Code Flags\+:}
\mbox{\hyperlink{code_flags_RET_VALUE_ONLY}{R\+E\+T\+\_\+\+V\+A\+L\+U\+E\+\_\+\+O\+N\+LY}}
\end{DoxyParagraph}

\begin{DoxyParams}{Parameters}
{\em opt} & the option to get\\
\hline
\end{DoxyParams}

\begin{DoxyExceptions}{Exceptions}
{\em D\+B\+I-\/\+O\+P\+T\+I\+O\+N-\/\+E\+R\+R\+OR} & unknown or unsupported option passed to driver\\
\hline
\end{DoxyExceptions}
\begin{DoxySince}{Since}
Qore 0.\+8.\+6 
\end{DoxySince}
\mbox{\Hypertarget{class_qore_1_1_s_q_l_1_1_datasource_pool_a7e229e19a615801165728ce76f88eb52}\label{class_qore_1_1_s_q_l_1_1_datasource_pool_a7e229e19a615801165728ce76f88eb52}} 
\index{Qore\+::\+S\+Q\+L\+::\+Datasource\+Pool@{Qore\+::\+S\+Q\+L\+::\+Datasource\+Pool}!get\+Option\+Hash@{get\+Option\+Hash}}
\index{get\+Option\+Hash@{get\+Option\+Hash}!Qore\+::\+S\+Q\+L\+::\+Datasource\+Pool@{Qore\+::\+S\+Q\+L\+::\+Datasource\+Pool}}
\subsubsection{\texorpdfstring{get\+Option\+Hash()}{getOptionHash()}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__type__conversion__functions_ga0231dbb472dd230310af7c7c34f56e92}{hash}}$<$auto$>$ Qore\+::\+S\+Q\+L\+::\+Datasource\+Pool\+::get\+Option\+Hash (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



returns the valid options for the driver associated with the \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_datasource}{Datasource}} with descriptions and current values for the current \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_datasource}{Datasource}} object 

\begin{DoxyParagraph}{Code Flags\+:}
\mbox{\hyperlink{code_flags_CONSTANT}{C\+O\+N\+S\+T\+A\+NT}}
\end{DoxyParagraph}
\begin{DoxyReturn}{Returns}
a hash where the keys are valid option names, and the values are hashes with the following keys\+:
\begin{DoxyItemize}
\item {\ttfamily \char`\"{}desc\char`\"{}}\+: a string description of the option
\item {\ttfamily \char`\"{}type\char`\"{}}\+: a string giving the data type restriction for the option
\item {\ttfamily \char`\"{}value\char`\"{}}\+: the current value of the option
\end{DoxyItemize}
\end{DoxyReturn}
\begin{DoxySince}{Since}
Qore 0.\+8.\+6 
\end{DoxySince}
\mbox{\Hypertarget{class_qore_1_1_s_q_l_1_1_datasource_pool_af07e9048d42519070a937beea07423fc}\label{class_qore_1_1_s_q_l_1_1_datasource_pool_af07e9048d42519070a937beea07423fc}} 
\index{Qore\+::\+S\+Q\+L\+::\+Datasource\+Pool@{Qore\+::\+S\+Q\+L\+::\+Datasource\+Pool}!get\+O\+S\+Charset@{get\+O\+S\+Charset}}
\index{get\+O\+S\+Charset@{get\+O\+S\+Charset}!Qore\+::\+S\+Q\+L\+::\+Datasource\+Pool@{Qore\+::\+S\+Q\+L\+::\+Datasource\+Pool}}
\subsubsection{\texorpdfstring{get\+O\+S\+Charset()}{getOSCharset()}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} Qore\+::\+S\+Q\+L\+::\+Datasource\+Pool\+::get\+O\+S\+Charset (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



Returns the Qore character encoding name for the object as a string or {\ttfamily \char`\"{}(unknown)\char`\"{}} if none is set. 

\begin{DoxyReturn}{Returns}
the Qore character encoding name for the object as a string or {\ttfamily \char`\"{}(unknown)\char`\"{}} if none is set
\end{DoxyReturn}
\begin{DoxyParagraph}{Code Flags\+:}
\mbox{\hyperlink{code_flags_CONSTANT}{C\+O\+N\+S\+T\+A\+NT}}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}
string enc = db.getOSCharset();
\end{DoxyCode}

\end{DoxyParagraph}
\begin{DoxySeeAlso}{See also}
\mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_datasource_pool_a894276b97b76b3526516613f1182dee5}{Datasource\+Pool\+::get\+O\+S\+Encoding()}} 
\end{DoxySeeAlso}
\mbox{\Hypertarget{class_qore_1_1_s_q_l_1_1_datasource_pool_a894276b97b76b3526516613f1182dee5}\label{class_qore_1_1_s_q_l_1_1_datasource_pool_a894276b97b76b3526516613f1182dee5}} 
\index{Qore\+::\+S\+Q\+L\+::\+Datasource\+Pool@{Qore\+::\+S\+Q\+L\+::\+Datasource\+Pool}!get\+O\+S\+Encoding@{get\+O\+S\+Encoding}}
\index{get\+O\+S\+Encoding@{get\+O\+S\+Encoding}!Qore\+::\+S\+Q\+L\+::\+Datasource\+Pool@{Qore\+::\+S\+Q\+L\+::\+Datasource\+Pool}}
\subsubsection{\texorpdfstring{get\+O\+S\+Encoding()}{getOSEncoding()}}
{\footnotesize\ttfamily \+\_\+\+\_\+7\+\_\+ \mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} Qore\+::\+S\+Q\+L\+::\+Datasource\+Pool\+::get\+O\+S\+Encoding (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [virtual]}}



Returns the Qore character encoding name for the object as a string or \mbox{\hyperlink{basic_data_types_nothing}{N\+O\+T\+H\+I\+NG}} if none is set. 

\begin{DoxyReturn}{Returns}
the Qore character encoding name for the object as a string or \mbox{\hyperlink{basic_data_types_nothing}{N\+O\+T\+H\+I\+NG}} if none is set
\end{DoxyReturn}
\begin{DoxyParagraph}{Code Flags\+:}
\mbox{\hyperlink{code_flags_CONSTANT}{C\+O\+N\+S\+T\+A\+NT}}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}
*string enc = db.getOSEncoding();
\end{DoxyCode}
 
\end{DoxyParagraph}


Implements \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_abstract_datasource_ab5d951f88607a8f3580730c894cd4681}{Qore\+::\+S\+Q\+L\+::\+Abstract\+Datasource}}.

\mbox{\Hypertarget{class_qore_1_1_s_q_l_1_1_datasource_pool_a09f75c1b73aa9971b2ae8cd57e1e38c0}\label{class_qore_1_1_s_q_l_1_1_datasource_pool_a09f75c1b73aa9971b2ae8cd57e1e38c0}} 
\index{Qore\+::\+S\+Q\+L\+::\+Datasource\+Pool@{Qore\+::\+S\+Q\+L\+::\+Datasource\+Pool}!get\+Password@{get\+Password}}
\index{get\+Password@{get\+Password}!Qore\+::\+S\+Q\+L\+::\+Datasource\+Pool@{Qore\+::\+S\+Q\+L\+::\+Datasource\+Pool}}
\subsubsection{\texorpdfstring{get\+Password()}{getPassword()}}
{\footnotesize\ttfamily \+\_\+\+\_\+7\+\_\+ \mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} Qore\+::\+S\+Q\+L\+::\+Datasource\+Pool\+::get\+Password (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [virtual]}}



Returns the password parameter as a string or \mbox{\hyperlink{basic_data_types_nothing}{N\+O\+T\+H\+I\+NG}} if none is set. 

\begin{DoxyReturn}{Returns}
the password parameter as a string or \mbox{\hyperlink{basic_data_types_nothing}{N\+O\+T\+H\+I\+NG}} if none is set
\end{DoxyReturn}
\begin{DoxyParagraph}{Code Flags\+:}
\mbox{\hyperlink{code_flags_CONSTANT}{C\+O\+N\+S\+T\+A\+NT}}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}
*string \textcolor{keywordflow}{pass} = db.getPassword();
\end{DoxyCode}
 
\end{DoxyParagraph}


Implements \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_abstract_datasource_ac245a7e0615433778ab7a61abf845c54}{Qore\+::\+S\+Q\+L\+::\+Abstract\+Datasource}}.

\mbox{\Hypertarget{class_qore_1_1_s_q_l_1_1_datasource_pool_a99935d80ec9ca0739ed3031ec614ce52}\label{class_qore_1_1_s_q_l_1_1_datasource_pool_a99935d80ec9ca0739ed3031ec614ce52}} 
\index{Qore\+::\+S\+Q\+L\+::\+Datasource\+Pool@{Qore\+::\+S\+Q\+L\+::\+Datasource\+Pool}!get\+Port@{get\+Port}}
\index{get\+Port@{get\+Port}!Qore\+::\+S\+Q\+L\+::\+Datasource\+Pool@{Qore\+::\+S\+Q\+L\+::\+Datasource\+Pool}}
\subsubsection{\texorpdfstring{get\+Port()}{getPort()}}
{\footnotesize\ttfamily \+\_\+\+\_\+7\+\_\+ \mbox{\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int}} Qore\+::\+S\+Q\+L\+::\+Datasource\+Pool\+::get\+Port (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [virtual]}}



Gets the port number that will be used for the next connection to the server. 

Invalid port numbers will cause an exception to be thrown when the connection is opened

\begin{DoxyParagraph}{Code Flags\+:}
\mbox{\hyperlink{code_flags_CONSTANT}{C\+O\+N\+S\+T\+A\+NT}}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}
*int port = db.getPort();
\end{DoxyCode}
 
\end{DoxyParagraph}


Implements \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_abstract_datasource_a54d89afe6d44810ed7e141ba35310748}{Qore\+::\+S\+Q\+L\+::\+Abstract\+Datasource}}.

\mbox{\Hypertarget{class_qore_1_1_s_q_l_1_1_datasource_pool_a953480807dbdafae0808a6c47014c0d6}\label{class_qore_1_1_s_q_l_1_1_datasource_pool_a953480807dbdafae0808a6c47014c0d6}} 
\index{Qore\+::\+S\+Q\+L\+::\+Datasource\+Pool@{Qore\+::\+S\+Q\+L\+::\+Datasource\+Pool}!get\+Server\+Version@{get\+Server\+Version}}
\index{get\+Server\+Version@{get\+Server\+Version}!Qore\+::\+S\+Q\+L\+::\+Datasource\+Pool@{Qore\+::\+S\+Q\+L\+::\+Datasource\+Pool}}
\subsubsection{\texorpdfstring{get\+Server\+Version()}{getServerVersion()}}
{\footnotesize\ttfamily auto Qore\+::\+S\+Q\+L\+::\+Datasource\+Pool\+::get\+Server\+Version (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [virtual]}}



Returns the driver-\/specific server version data for the current connection. 

\begin{DoxyReturn}{Returns}
the driver-\/specific server version data for the current connection; see the D\+BI driver documentation for the return data type and format
\end{DoxyReturn}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}
auto ver = db.getServerVersion();
\end{DoxyCode}

\end{DoxyParagraph}
\begin{DoxyNote}{Note}
see the documentation for the D\+BI driver being used for additional possible exceptions 
\end{DoxyNote}


Implements \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_abstract_datasource_acd2bef573f9d703c9511efd38bc1c2ec}{Qore\+::\+S\+Q\+L\+::\+Abstract\+Datasource}}.

\mbox{\Hypertarget{class_qore_1_1_s_q_l_1_1_datasource_pool_af59598025506fa7079b734018a89decf}\label{class_qore_1_1_s_q_l_1_1_datasource_pool_af59598025506fa7079b734018a89decf}} 
\index{Qore\+::\+S\+Q\+L\+::\+Datasource\+Pool@{Qore\+::\+S\+Q\+L\+::\+Datasource\+Pool}!get\+S\+Q\+L\+Statement@{get\+S\+Q\+L\+Statement}}
\index{get\+S\+Q\+L\+Statement@{get\+S\+Q\+L\+Statement}!Qore\+::\+S\+Q\+L\+::\+Datasource\+Pool@{Qore\+::\+S\+Q\+L\+::\+Datasource\+Pool}}
\subsubsection{\texorpdfstring{get\+S\+Q\+L\+Statement()}{getSQLStatement()}}
{\footnotesize\ttfamily \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_abstract_s_q_l_statement}{Abstract\+S\+Q\+L\+Statement}} Qore\+::\+S\+Q\+L\+::\+Datasource\+Pool\+::get\+S\+Q\+L\+Statement (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



Returns an \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_abstract_s_q_l_statement}{Abstract\+S\+Q\+L\+Statement}} object based on the current database connection object. 

\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}
AbstractSQLStatement stmt = ds.getSQLStatement();
\end{DoxyCode}

\end{DoxyParagraph}

\begin{DoxyExceptions}{Exceptions}
{\em S\+Q\+L\+S\+T\+A\+T\+E\+M\+E\+N\+T-\/\+E\+R\+R\+OR} & the D\+BI driver for the given object does not support the prepared statement A\+PI\\
\hline
\end{DoxyExceptions}
\begin{DoxySince}{Since}
\mbox{\hyperlink{namespace_qore}{Qore}} 0.\+9.\+0 
\end{DoxySince}
\mbox{\Hypertarget{class_qore_1_1_s_q_l_1_1_datasource_pool_a8247564b5f796c196f6532603c27d244}\label{class_qore_1_1_s_q_l_1_1_datasource_pool_a8247564b5f796c196f6532603c27d244}} 
\index{Qore\+::\+S\+Q\+L\+::\+Datasource\+Pool@{Qore\+::\+S\+Q\+L\+::\+Datasource\+Pool}!get\+Usage\+Info@{get\+Usage\+Info}}
\index{get\+Usage\+Info@{get\+Usage\+Info}!Qore\+::\+S\+Q\+L\+::\+Datasource\+Pool@{Qore\+::\+S\+Q\+L\+::\+Datasource\+Pool}}
\subsubsection{\texorpdfstring{get\+Usage\+Info()}{getUsageInfo()}}
{\footnotesize\ttfamily \+\_\+\+\_\+7\+\_\+ \mbox{\hyperlink{group__type__conversion__functions_ga0231dbb472dd230310af7c7c34f56e92}{hash}}$<$auto$>$ Qore\+::\+S\+Q\+L\+::\+Datasource\+Pool\+::get\+Usage\+Info (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



Returns a hash with usage information about the \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_datasource_pool}{Datasource\+Pool}} object. 

\begin{DoxyParagraph}{Code Flags\+:}
\mbox{\hyperlink{code_flags_CONSTANT}{C\+O\+N\+S\+T\+A\+NT}}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}
hash<auto> h = ds.getUsageInfo();
\end{DoxyCode}

\end{DoxyParagraph}
\begin{DoxyReturn}{Returns}
a hash with the following keys (note that the {\ttfamily callback}, {\ttfamily timeout}, and optionally {\ttfamily arg} keys are only set if a warning callback is set)\+:
\begin{DoxyItemize}
\item {\ttfamily callback\+:} the \mbox{\hyperlink{expressions_closure}{closure}} or \mbox{\hyperlink{expressions_call_reference}{call reference}} set as the warning callback
\item {\ttfamily timeout\+:} an integer giving the timeout threshold in milliseconds before the warning callback is executed
\item {\ttfamily arg\+:} an optional argument passed to the warning callback
\item {\ttfamily wait\+\_\+max\+:} the maximum number of microseconds that threads have had to wait for a free connection
\item {\ttfamily stats\+\_\+reqs\+:} the total number of requests for connections / transactions on this \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_datasource_pool}{Datasource\+Pool}}
\item {\ttfamily stats\+\_\+hits\+:} the total number of requests for connections / transactions on this \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_datasource_pool}{Datasource\+Pool}} that did not have to wait for a connection
\end{DoxyItemize}
\end{DoxyReturn}
\begin{DoxyNote}{Note}
{\ttfamily wait\+\_\+max} is reported in microseconds (1 ms = 1000 us) while the warning timeout has a resolution of milliseconds
\end{DoxyNote}
\begin{DoxySince}{Since}
Qore 0.\+8.\+9 
\end{DoxySince}
\mbox{\Hypertarget{class_qore_1_1_s_q_l_1_1_datasource_pool_aaf036746fb8d7c107b09d7288924b64b}\label{class_qore_1_1_s_q_l_1_1_datasource_pool_aaf036746fb8d7c107b09d7288924b64b}} 
\index{Qore\+::\+S\+Q\+L\+::\+Datasource\+Pool@{Qore\+::\+S\+Q\+L\+::\+Datasource\+Pool}!get\+User\+Name@{get\+User\+Name}}
\index{get\+User\+Name@{get\+User\+Name}!Qore\+::\+S\+Q\+L\+::\+Datasource\+Pool@{Qore\+::\+S\+Q\+L\+::\+Datasource\+Pool}}
\subsubsection{\texorpdfstring{get\+User\+Name()}{getUserName()}}
{\footnotesize\ttfamily \+\_\+\+\_\+7\+\_\+ \mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} Qore\+::\+S\+Q\+L\+::\+Datasource\+Pool\+::get\+User\+Name (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [virtual]}}



Returns the username parameter as a string or \mbox{\hyperlink{basic_data_types_nothing}{N\+O\+T\+H\+I\+NG}} if none is set. 

\begin{DoxyReturn}{Returns}
the username parameter as a string or \mbox{\hyperlink{basic_data_types_nothing}{N\+O\+T\+H\+I\+NG}} if none is set
\end{DoxyReturn}
\begin{DoxyParagraph}{Code Flags\+:}
\mbox{\hyperlink{code_flags_CONSTANT}{C\+O\+N\+S\+T\+A\+NT}}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}
*string user = db.getUserName();
\end{DoxyCode}
 
\end{DoxyParagraph}


Implements \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_abstract_datasource_aea226bb7ae548363ae25a4f1e306b34a}{Qore\+::\+S\+Q\+L\+::\+Abstract\+Datasource}}.

\mbox{\Hypertarget{class_qore_1_1_s_q_l_1_1_datasource_pool_a3b868b40604c049b4bf78b121ede7c16}\label{class_qore_1_1_s_q_l_1_1_datasource_pool_a3b868b40604c049b4bf78b121ede7c16}} 
\index{Qore\+::\+S\+Q\+L\+::\+Datasource\+Pool@{Qore\+::\+S\+Q\+L\+::\+Datasource\+Pool}!in\+Transaction@{in\+Transaction}}
\index{in\+Transaction@{in\+Transaction}!Qore\+::\+S\+Q\+L\+::\+Datasource\+Pool@{Qore\+::\+S\+Q\+L\+::\+Datasource\+Pool}}
\subsubsection{\texorpdfstring{in\+Transaction()}{inTransaction()}}
{\footnotesize\ttfamily bool Qore\+::\+S\+Q\+L\+::\+Datasource\+Pool\+::in\+Transaction (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [virtual]}}



Returns \mbox{\hyperlink{group__boolean__constants_ga3ba2df91713a6249449347131ea526c3}{True}} if a transaction is currently in progress (meaning in this case that a datasource form the pool is dedicated to the calling thread), \mbox{\hyperlink{group__boolean__constants_ga9da2b9a8003cd3788e48305f8a00540f}{False}} if not. 

\begin{DoxyReturn}{Returns}
\mbox{\hyperlink{group__boolean__constants_ga3ba2df91713a6249449347131ea526c3}{True}} if a transaction is currently in progress (meaning in this case that a datasource form the pool is dedicated to the calling thread), \mbox{\hyperlink{group__boolean__constants_ga9da2b9a8003cd3788e48305f8a00540f}{False}} if not
\end{DoxyReturn}
\begin{DoxyParagraph}{Code Flags\+:}
\mbox{\hyperlink{code_flags_CONSTANT}{C\+O\+N\+S\+T\+A\+NT}}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}
bool b = db.inTransaction();
\end{DoxyCode}
 
\end{DoxyParagraph}


Implements \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_abstract_datasource_ac7fe5b3cf6789100950622138915517e}{Qore\+::\+S\+Q\+L\+::\+Abstract\+Datasource}}.

\mbox{\Hypertarget{class_qore_1_1_s_q_l_1_1_datasource_pool_a73532001be895a5a30cc58c5bfbe2c1c}\label{class_qore_1_1_s_q_l_1_1_datasource_pool_a73532001be895a5a30cc58c5bfbe2c1c}} 
\index{Qore\+::\+S\+Q\+L\+::\+Datasource\+Pool@{Qore\+::\+S\+Q\+L\+::\+Datasource\+Pool}!rollback@{rollback}}
\index{rollback@{rollback}!Qore\+::\+S\+Q\+L\+::\+Datasource\+Pool@{Qore\+::\+S\+Q\+L\+::\+Datasource\+Pool}}
\subsubsection{\texorpdfstring{rollback()}{rollback()}}
{\footnotesize\ttfamily nothing Qore\+::\+S\+Q\+L\+::\+Datasource\+Pool\+::rollback (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [virtual]}}



Rolls back the current transaction and releases the connection to the pool. 

\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}
db.rollback();
\end{DoxyCode}
 
\end{DoxyParagraph}


Implements \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_abstract_datasource_acccf4e46fb29f2d12700cc6feb0c9438}{Qore\+::\+S\+Q\+L\+::\+Abstract\+Datasource}}.

\mbox{\Hypertarget{class_qore_1_1_s_q_l_1_1_datasource_pool_acafe45a0cf883bc51917e7a0bb8e77fd}\label{class_qore_1_1_s_q_l_1_1_datasource_pool_acafe45a0cf883bc51917e7a0bb8e77fd}} 
\index{Qore\+::\+S\+Q\+L\+::\+Datasource\+Pool@{Qore\+::\+S\+Q\+L\+::\+Datasource\+Pool}!select@{select}}
\index{select@{select}!Qore\+::\+S\+Q\+L\+::\+Datasource\+Pool@{Qore\+::\+S\+Q\+L\+::\+Datasource\+Pool}}
\subsubsection{\texorpdfstring{select()}{select()}}
{\footnotesize\ttfamily auto Qore\+::\+S\+Q\+L\+::\+Datasource\+Pool\+::select (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}}}]{sql,  }\item[{}]{... }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [virtual]}}



Executes an S\+QL select statement on the server and returns the result as a hash (column names) of lists (column values per row) 

The return format of this method is suitable for use with \mbox{\hyperlink{statements_context}{context statements}}, for easy iteration and processing of query results. Alternatively, the \mbox{\hyperlink{class_qore_1_1_hash_list_iterator}{Hash\+List\+Iterator}} class can be used to iterate the return value of this method.

Additionally, this format is a more efficient format than that returned by the \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_datasource_a41126ab5a3d9e11ee7dd6d7975dfd65a}{Datasource\+::select\+Rows()}} method, because the column names are not repeated for each row returned. Therefore, for retrieving anything greater than small amounts of data, it is recommended to use this method instead of \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_datasource_a41126ab5a3d9e11ee7dd6d7975dfd65a}{Datasource\+::select\+Rows()}}.

This method also accepts all bind parameters ({\ttfamily \%d}, {\ttfamily \%v}, {\ttfamily \%s}, etc) as documented in \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_datasource_sql_binding}{Binding by Value and Placeholder}}

This method does not retain the datasource connection for the current thread if one was not already allocated before this method is called, so to execute select statements that begin a transaction (such as {\ttfamily \char`\"{}select for update\char`\"{}}), execute \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_datasource_pool_a04c351f440ddfdbe79f9b4ef26608e6f}{Datasource\+Pool\+::begin\+Transaction()}} first to ensure that the connection is dedicated to the calling thread.


\begin{DoxyParams}{Parameters}
{\em sql} & The S\+QL command to execute on the server \\
\hline
{\em ...} & Include any values to be bound (using {\ttfamily \%v} in the command string) or placeholder specifications (using {\ttfamily \+:}{\itshape key\+\_\+name} in the command string) in order after the command string\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
This method returns a hash (the keys are the column names) of lists (the column data per row) when executed with an S\+QL select statement, however some D\+BI drivers allow any S\+QL to be executed through this method, in which case other data types can be returned (such as an integer for a row count or a hash for output parameters when executing a stored procedure). If no rows are found, a hash of column names assigned to empty lists is returned.
\end{DoxyReturn}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}
\textcolor{comment}{# bind a string and a date/time value by value in a query}
hash query = db.select(\textcolor{stringliteral}{"select * from table where varchar\_column = %v and timestamp\_column > %v"}, string, 2
      007-10-11T15:31:26.289);
\textcolor{keywordflow}{if} (query.firstValue())
    \mbox{\hyperlink{group__string__functions_ga32070517a9f8a70a32ef48f83a6f128e}{printf}}(\textcolor{stringliteral}{"got results\(\backslash\)n"});
\end{DoxyCode}

\end{DoxyParagraph}
\begin{DoxyNote}{Note}

\begin{DoxyItemize}
\item See the documentation for the D\+BI driver being used for additional possible exceptions
\item This method returns all the data available immediately; to process query data piecewise, use the \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_s_q_l_statement}{S\+Q\+L\+Statement}} class
\end{DoxyItemize}
\end{DoxyNote}
\begin{DoxySeeAlso}{See also}

\begin{DoxyItemize}
\item \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_datasource_pool_a1162ad06aa3f4fc5fb31531ef5ca624b}{Datasource\+Pool\+::vselect()}}
\item \mbox{\hyperlink{class_qore_1_1zzz8hashzzz9_aab3d2e6e69d212dbe05de43136f14367}{Qore\+::zzz8hashzzz9\+::context\+Iterator()}}
\item \mbox{\hyperlink{statements_context}{context Statements}} 
\end{DoxyItemize}
\end{DoxySeeAlso}


Implements \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_abstract_datasource_a594c9f65813ada4668a67aca0a5c0331}{Qore\+::\+S\+Q\+L\+::\+Abstract\+Datasource}}.

\mbox{\Hypertarget{class_qore_1_1_s_q_l_1_1_datasource_pool_ac194599669509211cc64e9caf0aa56b3}\label{class_qore_1_1_s_q_l_1_1_datasource_pool_ac194599669509211cc64e9caf0aa56b3}} 
\index{Qore\+::\+S\+Q\+L\+::\+Datasource\+Pool@{Qore\+::\+S\+Q\+L\+::\+Datasource\+Pool}!select\+Row@{select\+Row}}
\index{select\+Row@{select\+Row}!Qore\+::\+S\+Q\+L\+::\+Datasource\+Pool@{Qore\+::\+S\+Q\+L\+::\+Datasource\+Pool}}
\subsubsection{\texorpdfstring{select\+Row()}{selectRow()}}
{\footnotesize\ttfamily auto Qore\+::\+S\+Q\+L\+::\+Datasource\+Pool\+::select\+Row (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}}}]{sql,  }\item[{}]{... }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [virtual]}}



Executes an S\+QL select statement on the server and returns the first row as a hash (the column values) 

If more than one row is returned, then it is treated as an error and a {\ttfamily D\+B\+I-\/\+S\+E\+L\+E\+C\+T-\/\+R\+O\+W-\/\+E\+R\+R\+OR} is returned (however the D\+BI driver should raise its own exception here to avoid retrieving more than one row from the server). For a similar method taking a list for all bind arguments, see \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_datasource_pool_a9cfedca21f0be7698893b5e5cc5d394a}{Datasource\+Pool\+::vselect\+Row()}}.

This method also accepts all bind parameters ({\ttfamily \%d}, {\ttfamily \%v}, {\ttfamily \%s}, etc) as documented in \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_datasource_sql_binding}{Binding by Value and Placeholder}}

This method does not retain the datasource connection for the current thread if one was not already allocated before this method is called, so to execute select statements that begin a transaction (such as {\ttfamily \char`\"{}select for update\char`\"{}}), execute \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_datasource_pool_a04c351f440ddfdbe79f9b4ef26608e6f}{Datasource\+Pool\+::begin\+Transaction()}} first to ensure that the connection is dedicated to the calling thread.


\begin{DoxyParams}{Parameters}
{\em sql} & The S\+QL command to execute on the server \\
\hline
{\em ...} & Include any values to be bound (using {\ttfamily \%v} in the command string) or placeholder specifications (using {\ttfamily \+:}{\itshape key\+\_\+name} in the command string) in order after the command string\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
This method normally returns a hash (the keys are the column names) of row data or \mbox{\hyperlink{basic_data_types_nothing}{N\+O\+T\+H\+I\+NG}} if no row is found for the query when executed with an S\+QL select statement, however some D\+BI drivers allow any S\+QL statement to be executed through this method (not only select statements), in this case other data types can be returned
\end{DoxyReturn}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}
*hash<auto> h = db.selectRow(\textcolor{stringliteral}{"select * from example\_table where id = 1"});
\end{DoxyCode}

\end{DoxyParagraph}

\begin{DoxyExceptions}{Exceptions}
{\em D\+B\+I-\/\+S\+E\+L\+E\+C\+T-\/\+R\+O\+W-\/\+E\+R\+R\+OR} & more than 1 row retrieved from the server\\
\hline
\end{DoxyExceptions}
\begin{DoxyNote}{Note}
see the documentation for the D\+BI driver being used for additional possible exceptions 
\end{DoxyNote}


Implements \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_abstract_datasource_a6d4bd90ff3b28a637b19254a7f09dfba}{Qore\+::\+S\+Q\+L\+::\+Abstract\+Datasource}}.

\mbox{\Hypertarget{class_qore_1_1_s_q_l_1_1_datasource_pool_a9298e44c0af5bb93330c929b47cde5c9}\label{class_qore_1_1_s_q_l_1_1_datasource_pool_a9298e44c0af5bb93330c929b47cde5c9}} 
\index{Qore\+::\+S\+Q\+L\+::\+Datasource\+Pool@{Qore\+::\+S\+Q\+L\+::\+Datasource\+Pool}!select\+Rows@{select\+Rows}}
\index{select\+Rows@{select\+Rows}!Qore\+::\+S\+Q\+L\+::\+Datasource\+Pool@{Qore\+::\+S\+Q\+L\+::\+Datasource\+Pool}}
\subsubsection{\texorpdfstring{select\+Rows()}{selectRows()}}
{\footnotesize\ttfamily auto Qore\+::\+S\+Q\+L\+::\+Datasource\+Pool\+::select\+Rows (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}}}]{sql,  }\item[{}]{... }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [virtual]}}



Executes an S\+QL select statement on the server and returns the result as a list (rows) of hashes (the column values) 

The return format of this method is not as memory efficient as that returned by the \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_datasource_pool_acafe45a0cf883bc51917e7a0bb8e77fd}{Datasource\+Pool\+::select()}} method, therefore for larger amounts of data, it is recommended to use \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_datasource_pool_acafe45a0cf883bc51917e7a0bb8e77fd}{Datasource\+Pool\+::select()}}.

The usual return value of this method can be iterated with the \mbox{\hyperlink{class_qore_1_1_list_hash_iterator}{List\+Hash\+Iterator}} class.

This method also accepts all bind parameters ({\ttfamily \%d}, {\ttfamily \%v}, {\ttfamily \%s}, etc) as documented in \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_datasource_sql_binding}{Binding by Value and Placeholder}}

This method does not retain the datasource connection for the current thread if one was not already allocated before this method is called, so to execute select statements that begin a transaction (such as {\ttfamily \char`\"{}select for update\char`\"{}}), execute \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_datasource_pool_a04c351f440ddfdbe79f9b4ef26608e6f}{Datasource\+Pool\+::begin\+Transaction()}} first to ensure that the connection is dedicated to the calling thread.


\begin{DoxyParams}{Parameters}
{\em sql} & The S\+QL command to execute on the server \\
\hline
{\em ...} & Include any values to be bound (using {\ttfamily \%v} in the command string) or placeholder specifications (using {\ttfamily \+:}{\itshape key\+\_\+name} in the command string) in order after the command string\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
Normally returns a list (rows) of hash (where the keys are the column names of each row) or \mbox{\hyperlink{basic_data_types_nothing}{N\+O\+T\+H\+I\+NG}} if no rows are found for the query, however some D\+BI drivers allow any S\+QL statement to be executed through this method (not only select statements), in this case other data types can be returned
\end{DoxyReturn}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}
*list<auto> list = db.selectRows(\textcolor{stringliteral}{"select * from example\_table"});
\end{DoxyCode}

\end{DoxyParagraph}
\begin{DoxyNote}{Note}
see the documentation for the D\+BI driver being used for additional possible exceptions
\end{DoxyNote}
\begin{DoxySeeAlso}{See also}
\mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_datasource_pool_acafe45a0cf883bc51917e7a0bb8e77fd}{Datasource\+Pool\+::select()}} 
\end{DoxySeeAlso}


Implements \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_abstract_datasource_af4a40e6be75f11ea926378b6815a9654}{Qore\+::\+S\+Q\+L\+::\+Abstract\+Datasource}}.

\mbox{\Hypertarget{class_qore_1_1_s_q_l_1_1_datasource_pool_a2347794ada3fa9c629e705b7d1e6ee56}\label{class_qore_1_1_s_q_l_1_1_datasource_pool_a2347794ada3fa9c629e705b7d1e6ee56}} 
\index{Qore\+::\+S\+Q\+L\+::\+Datasource\+Pool@{Qore\+::\+S\+Q\+L\+::\+Datasource\+Pool}!set\+Error\+Timeout@{set\+Error\+Timeout}}
\index{set\+Error\+Timeout@{set\+Error\+Timeout}!Qore\+::\+S\+Q\+L\+::\+Datasource\+Pool@{Qore\+::\+S\+Q\+L\+::\+Datasource\+Pool}}
\subsubsection{\texorpdfstring{set\+Error\+Timeout()}{setErrorTimeout()}}
{\footnotesize\ttfamily Qore\+::\+S\+Q\+L\+::\+Datasource\+Pool\+::set\+Error\+Timeout (\begin{DoxyParamCaption}\item[{timeout}]{ts }\end{DoxyParamCaption})}



Sets the timeout period for waiting for a connection to come free; note that timeout values less than or equal to zero mean that requests for a connection will wait indefinitely. 

\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}
ds.setErrorTimeout(30s);
\end{DoxyCode}

\end{DoxyParagraph}
\begin{DoxySince}{Since}
Qore 0.\+8.\+9 
\end{DoxySince}
\mbox{\Hypertarget{class_qore_1_1_s_q_l_1_1_datasource_pool_a358c35bb971eccbdcf917b9c5e3bed19}\label{class_qore_1_1_s_q_l_1_1_datasource_pool_a358c35bb971eccbdcf917b9c5e3bed19}} 
\index{Qore\+::\+S\+Q\+L\+::\+Datasource\+Pool@{Qore\+::\+S\+Q\+L\+::\+Datasource\+Pool}!set\+Event\+Queue@{set\+Event\+Queue}}
\index{set\+Event\+Queue@{set\+Event\+Queue}!Qore\+::\+S\+Q\+L\+::\+Datasource\+Pool@{Qore\+::\+S\+Q\+L\+::\+Datasource\+Pool}}
\subsubsection{\texorpdfstring{set\+Event\+Queue()}{setEventQueue()}}
{\footnotesize\ttfamily nothing Qore\+::\+S\+Q\+L\+::\+Datasource\+Pool\+::set\+Event\+Queue (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{class_qore_1_1_thread_1_1_queue}{Qore\+::\+Thread\+::\+Queue}}}]{queue,  }\item[{auto}]{arg }\end{DoxyParamCaption})}



Sets a queue object for D\+BI events on the pool. 


\begin{DoxyParams}{Parameters}
{\em queue} & the \mbox{\hyperlink{class_qore_1_1_thread_1_1_queue}{Queue}} object to receive datasource events; note that the \mbox{\hyperlink{class_qore_1_1_thread_1_1_queue}{Queue}} passed cannot have any maximum size set or a {\ttfamily Q\+U\+E\+U\+E-\/\+E\+R\+R\+OR} will be thrown; passing \mbox{\hyperlink{basic_data_types_nothing}{N\+O\+T\+H\+I\+NG}} will clear any event queue \\
\hline
{\em arg} & an argument to be included in the {\ttfamily arg} key of datasource events\\
\hline
\end{DoxyParams}

\begin{DoxyExceptions}{Exceptions}
{\em Q\+U\+E\+U\+E-\/\+E\+R\+R\+OR} & the Queue passed has a maximum size set\\
\hline
\end{DoxyExceptions}
\begin{DoxySince}{Since}
Qore 0.\+8.\+9 
\end{DoxySince}
\mbox{\Hypertarget{class_qore_1_1_s_q_l_1_1_datasource_pool_a8793cfc4c27420eda345f8a8d0224d6d}\label{class_qore_1_1_s_q_l_1_1_datasource_pool_a8793cfc4c27420eda345f8a8d0224d6d}} 
\index{Qore\+::\+S\+Q\+L\+::\+Datasource\+Pool@{Qore\+::\+S\+Q\+L\+::\+Datasource\+Pool}!set\+Warning\+Callback@{set\+Warning\+Callback}}
\index{set\+Warning\+Callback@{set\+Warning\+Callback}!Qore\+::\+S\+Q\+L\+::\+Datasource\+Pool@{Qore\+::\+S\+Q\+L\+::\+Datasource\+Pool}}
\subsubsection{\texorpdfstring{set\+Warning\+Callback()}{setWarningCallback()}}
{\footnotesize\ttfamily Qore\+::\+S\+Q\+L\+::\+Datasource\+Pool\+::set\+Warning\+Callback (\begin{DoxyParamCaption}\item[{timeout}]{ms,  }\item[{code}]{callback,  }\item[{auto}]{arg }\end{DoxyParamCaption})}



sets a connection delay warning callback to be called any time the delay assigning a connection from the pool exceeds the given timeout in milliseconds 

\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}
code cb = sub (string dsstr, int us, int to) \{
    \mbox{\hyperlink{group__string__functions_ga32070517a9f8a70a32ef48f83a6f128e}{printf}}(\textcolor{stringliteral}{"WARNING: datasource pool %y took %f ms (threshold %d ms) to assign a new connection\(\backslash\)n"}, 
      dsstr, us.toNumber() / 1000n, to);
\};
ds.setWarningCallback(5s, cb);
\end{DoxyCode}

\end{DoxyParagraph}

\begin{DoxyParams}{Parameters}
{\em ms} & the period of time with a resolution of milliseconds after which the callback will be called if a connection cannot be allocated in the given time period \\
\hline
{\em callback} & a \mbox{\hyperlink{expressions_closure}{closure}} or \mbox{\hyperlink{expressions_call_reference}{call reference}} taking three or four arguments\+: (\mbox{\hyperlink{data_type_declarations_string_type}{string}} {\itshape desc}, \mbox{\hyperlink{data_type_declarations_int_type}{int}} {\itshape time}, \mbox{\hyperlink{data_type_declarations_int_type}{int}} {\itshape warning\+\_\+timeout}\mbox{[}, \mbox{\hyperlink{data_type_declarations_any_type}{any}} {\itshape arg}\mbox{]}) which will be passed a datasource description string for the pool, an integer giving the amount of time it took to acquire the connection in microseconds (divide by 1000 to get milliseconds), an integer giving the warning timeout threshold in milliseconds, and optionally the {\itshape arg} value passed to this method \\
\hline
{\em arg} & an optional argument that will be passed to the warning callback\\
\hline
\end{DoxyParams}
\begin{DoxyNote}{Note}
that the warning timeout has a resolution of milliseconds, but the actual wait time is reported in microseconds (1 ms = 1000 us)
\end{DoxyNote}
\begin{DoxySince}{Since}
Qore 0.\+8.\+9 
\end{DoxySince}
\mbox{\Hypertarget{class_qore_1_1_s_q_l_1_1_datasource_pool_abbad1ff5e3fb76ffc76ca48eb097f615}\label{class_qore_1_1_s_q_l_1_1_datasource_pool_abbad1ff5e3fb76ffc76ca48eb097f615}} 
\index{Qore\+::\+S\+Q\+L\+::\+Datasource\+Pool@{Qore\+::\+S\+Q\+L\+::\+Datasource\+Pool}!to\+String@{to\+String}}
\index{to\+String@{to\+String}!Qore\+::\+S\+Q\+L\+::\+Datasource\+Pool@{Qore\+::\+S\+Q\+L\+::\+Datasource\+Pool}}
\subsubsection{\texorpdfstring{to\+String()}{toString()}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} Qore\+::\+S\+Q\+L\+::\+Datasource\+Pool\+::to\+String (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



Returns a string with technical information about the object. 

\begin{DoxyReturn}{Returns}
a string with technical information about the object
\end{DoxyReturn}
\begin{DoxyParagraph}{Code Flags\+:}
\mbox{\hyperlink{code_flags_CONSTANT}{C\+O\+N\+S\+T\+A\+NT}}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}
string str = db.toString();
\end{DoxyCode}
 
\end{DoxyParagraph}
\mbox{\Hypertarget{class_qore_1_1_s_q_l_1_1_datasource_pool_af3013ed0756f9bfa1e7ddf5232e0bf7e}\label{class_qore_1_1_s_q_l_1_1_datasource_pool_af3013ed0756f9bfa1e7ddf5232e0bf7e}} 
\index{Qore\+::\+S\+Q\+L\+::\+Datasource\+Pool@{Qore\+::\+S\+Q\+L\+::\+Datasource\+Pool}!vexec@{vexec}}
\index{vexec@{vexec}!Qore\+::\+S\+Q\+L\+::\+Datasource\+Pool@{Qore\+::\+S\+Q\+L\+::\+Datasource\+Pool}}
\subsubsection{\texorpdfstring{vexec()}{vexec()}}
{\footnotesize\ttfamily auto Qore\+::\+S\+Q\+L\+::\+Datasource\+Pool\+::vexec (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}}}]{sql,  }\item[{\+\_\+\+\_\+7\+\_\+ softlist$<$ auto $>$}]{vargs }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [virtual]}}



Allocates a persistent connection to the current thread from the pool (if one has not already been allocated) and executes S\+QL code on the DB connection, taking a list for all bind arguments. 

Same as \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_datasource_pool_a63735bf6bce9e84968a57786965163da}{Datasource\+Pool\+::exec()}} except takes an explicit list for bind arguments

This method also accepts all bind parameters ({\ttfamily \%d}, {\ttfamily \%v}, {\ttfamily \%s}, etc) as documented in \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_datasource_sql_binding}{Binding by Value and Placeholder}}


\begin{DoxyParams}{Parameters}
{\em sql} & The S\+QL command to execute on the server \\
\hline
{\em vargs} & Include any values to be bound (using {\ttfamily \%v} in the command string) or placeholder specifications (using {\ttfamily \+:}{\itshape key\+\_\+name} in the command string) in order after the command string\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
The return value depends on the D\+BI driver; normally, for commands with placeholders, a hash is returned holding the values acquired from executing the S\+QL statement. For all other commands, normally an integer row count is returned. However, some D\+BI drivers also allow select statements to be executed through this interface, which would also return a hash (column names) of lists (values for each column).
\end{DoxyReturn}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}
int rows = db.vexec(\textcolor{stringliteral}{"insert into example\_table value (%v, %v, %v)"}, arg\_list);
\end{DoxyCode}

\end{DoxyParagraph}
\begin{DoxyNote}{Note}
see the documentation for the D\+BI driver being used for additional possible exceptions 
\end{DoxyNote}


Implements \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_abstract_datasource_a68f3f2fd0d820097db47aac8cc9912fe}{Qore\+::\+S\+Q\+L\+::\+Abstract\+Datasource}}.

\mbox{\Hypertarget{class_qore_1_1_s_q_l_1_1_datasource_pool_a1162ad06aa3f4fc5fb31531ef5ca624b}\label{class_qore_1_1_s_q_l_1_1_datasource_pool_a1162ad06aa3f4fc5fb31531ef5ca624b}} 
\index{Qore\+::\+S\+Q\+L\+::\+Datasource\+Pool@{Qore\+::\+S\+Q\+L\+::\+Datasource\+Pool}!vselect@{vselect}}
\index{vselect@{vselect}!Qore\+::\+S\+Q\+L\+::\+Datasource\+Pool@{Qore\+::\+S\+Q\+L\+::\+Datasource\+Pool}}
\subsubsection{\texorpdfstring{vselect()}{vselect()}}
{\footnotesize\ttfamily auto Qore\+::\+S\+Q\+L\+::\+Datasource\+Pool\+::vselect (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}}}]{sql,  }\item[{\+\_\+\+\_\+7\+\_\+ softlist$<$ auto $>$}]{vargs }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [virtual]}}



Executes a select statement on the server and returns the results in a hash (column names) of lists (column values per row), taking a list for all bind arguments. 

The return format of this method is suitable for use with \mbox{\hyperlink{statements_context}{context statements}}, for easy iteration and processing of query results. Alternatively, the \mbox{\hyperlink{class_qore_1_1_hash_list_iterator}{Hash\+List\+Iterator}} class can be used to iterate the return value of this method.

This method also accepts all bind parameters ({\ttfamily \%d}, {\ttfamily \%v}, {\ttfamily \%s}, etc) as documented in \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_datasource_sql_binding}{Binding by Value and Placeholder}}

This method does not retain the datasource connection for the current thread if one was not already allocated before this method is called, so to execute select statements that begin a transaction (such as {\ttfamily \char`\"{}select for update\char`\"{}}), execute \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_datasource_pool_a04c351f440ddfdbe79f9b4ef26608e6f}{Datasource\+Pool\+::begin\+Transaction()}} first to ensure that the connection is dedicated to the calling thread.


\begin{DoxyParams}{Parameters}
{\em sql} & The S\+QL command to execute on the server \\
\hline
{\em vargs} & Include any values to be bound (using {\ttfamily \%v} in the command string) or placeholder specifications (using {\ttfamily \+:}{\itshape key\+\_\+name} in the command string) in order after the command string\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
Normally returns a hash (the keys are the column names) of list (each hash key\textquotesingle{}s value is a list giving the row data), however some D\+BI drivers allow any S\+QL statement to be executed through this method (not only select statements), in this case other data types can be returned. If no rows are found, a hash of column names assigned to empty lists is returned.
\end{DoxyReturn}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}
hash<auto> query = db.vselect(\textcolor{stringliteral}{"select * from example\_table where id = %v and name = %v"}, arg\_list);
\textcolor{keywordflow}{if} (query.firstValue())
    \mbox{\hyperlink{group__string__functions_ga32070517a9f8a70a32ef48f83a6f128e}{printf}}(\textcolor{stringliteral}{"got results\(\backslash\)n"});
\end{DoxyCode}

\end{DoxyParagraph}
\begin{DoxyNote}{Note}

\begin{DoxyItemize}
\item See the documentation for the D\+BI driver being used for additional possible exceptions
\item This method returns all the data available immediately; to process query data piecewise, use the \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_s_q_l_statement}{S\+Q\+L\+Statement}} class
\end{DoxyItemize}
\end{DoxyNote}
\begin{DoxySeeAlso}{See also}

\begin{DoxyItemize}
\item \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_datasource_pool_acafe45a0cf883bc51917e7a0bb8e77fd}{Datasource\+Pool\+::select()}}
\item \mbox{\hyperlink{class_qore_1_1zzz8hashzzz9_aab3d2e6e69d212dbe05de43136f14367}{Qore\+::zzz8hashzzz9\+::context\+Iterator()}}
\item \mbox{\hyperlink{statements_context}{context Statements}} 
\end{DoxyItemize}
\end{DoxySeeAlso}


Implements \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_abstract_datasource_ac1dd6bceaddef45dc6db0001dc142180}{Qore\+::\+S\+Q\+L\+::\+Abstract\+Datasource}}.

\mbox{\Hypertarget{class_qore_1_1_s_q_l_1_1_datasource_pool_a9cfedca21f0be7698893b5e5cc5d394a}\label{class_qore_1_1_s_q_l_1_1_datasource_pool_a9cfedca21f0be7698893b5e5cc5d394a}} 
\index{Qore\+::\+S\+Q\+L\+::\+Datasource\+Pool@{Qore\+::\+S\+Q\+L\+::\+Datasource\+Pool}!vselect\+Row@{vselect\+Row}}
\index{vselect\+Row@{vselect\+Row}!Qore\+::\+S\+Q\+L\+::\+Datasource\+Pool@{Qore\+::\+S\+Q\+L\+::\+Datasource\+Pool}}
\subsubsection{\texorpdfstring{vselect\+Row()}{vselectRow()}}
{\footnotesize\ttfamily auto Qore\+::\+S\+Q\+L\+::\+Datasource\+Pool\+::vselect\+Row (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}}}]{sql,  }\item[{\+\_\+\+\_\+7\+\_\+ softlist$<$ auto $>$}]{vargs }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [virtual]}}



Executes a select statement on the server and returns the first row as a hash (column names and values), taking a list for all bind arguments. 

This method is the same as the \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_datasource_pool_ac194599669509211cc64e9caf0aa56b3}{Datasource\+Pool\+::select\+Row()}} method, except this method takes a single argument after the S\+QL command giving the list of bind value parameters

This method also accepts all bind parameters ({\ttfamily \%d}, {\ttfamily \%v}, {\ttfamily \%s}, etc) as documented in \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_datasource_sql_binding}{Binding by Value and Placeholder}}

This method does not retain the datasource connection for the current thread if one was not already allocated before this method is called, so to execute select statements that begin a transaction (such as {\ttfamily \char`\"{}select for update\char`\"{}}), execute \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_datasource_pool_a04c351f440ddfdbe79f9b4ef26608e6f}{Datasource\+Pool\+::begin\+Transaction()}} first to ensure that the connection is dedicated to the calling thread.


\begin{DoxyParams}{Parameters}
{\em sql} & The S\+QL command to execute on the server \\
\hline
{\em vargs} & Include any values to be bound (using {\ttfamily \%v} in the command string) or placeholder specifications (using {\ttfamily \+:}{\itshape key\+\_\+name} in the command string) in order after the command string\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
This method normally returns a hash (the keys are the column names) of row data or \mbox{\hyperlink{basic_data_types_nothing}{N\+O\+T\+H\+I\+NG}} if no row is found for the query when executed with an S\+QL select statement, however some D\+BI drivers allow any S\+QL statement to be executed through this method (not only select statements), in this case other data types can be returned
\end{DoxyReturn}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}
*hash<auto> h = db.vselectRow(\textcolor{stringliteral}{"select * from example\_table where id = %v and type = %v"}, arg\_list);
\end{DoxyCode}

\end{DoxyParagraph}
\begin{DoxyNote}{Note}
see the documentation for the D\+BI driver being used for additional possible exceptions
\end{DoxyNote}
\begin{DoxySeeAlso}{See also}
\mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_datasource_pool_ac194599669509211cc64e9caf0aa56b3}{Datasource\+Pool\+::select\+Row()}} 
\end{DoxySeeAlso}


Implements \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_abstract_datasource_a82bd28bd70590c4519053d058d61e0e6}{Qore\+::\+S\+Q\+L\+::\+Abstract\+Datasource}}.

\mbox{\Hypertarget{class_qore_1_1_s_q_l_1_1_datasource_pool_ae214619fc06c77270ed38e7c013538e9}\label{class_qore_1_1_s_q_l_1_1_datasource_pool_ae214619fc06c77270ed38e7c013538e9}} 
\index{Qore\+::\+S\+Q\+L\+::\+Datasource\+Pool@{Qore\+::\+S\+Q\+L\+::\+Datasource\+Pool}!vselect\+Rows@{vselect\+Rows}}
\index{vselect\+Rows@{vselect\+Rows}!Qore\+::\+S\+Q\+L\+::\+Datasource\+Pool@{Qore\+::\+S\+Q\+L\+::\+Datasource\+Pool}}
\subsubsection{\texorpdfstring{vselect\+Rows()}{vselectRows()}}
{\footnotesize\ttfamily auto Qore\+::\+S\+Q\+L\+::\+Datasource\+Pool\+::vselect\+Rows (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}}}]{sql,  }\item[{\+\_\+\+\_\+7\+\_\+ softlist$<$ auto $>$}]{vargs }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [virtual]}}



Executes a select statement on the server and returns the results in a list (rows) of hashes (column names and values), taking a list for all bind arguments. 

Same as the \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_datasource_a41126ab5a3d9e11ee7dd6d7975dfd65a}{Datasource\+::select\+Rows()}} method, except this method takes a single argument after the S\+QL command giving the list of bind value parameters.

The usual return value of this method can be iterated with the \mbox{\hyperlink{class_qore_1_1_list_hash_iterator}{List\+Hash\+Iterator}} class.

The return format of this method is not as memory efficient as that returned by the \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_datasource_pool_acafe45a0cf883bc51917e7a0bb8e77fd}{Datasource\+Pool\+::select()}} method, therefore for larger amounts of data, it is recommended to use \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_datasource_pool_acafe45a0cf883bc51917e7a0bb8e77fd}{Datasource\+Pool\+::select()}}.

This method also accepts all bind parameters ({\ttfamily \%d}, {\ttfamily \%v}, {\ttfamily \%s}, etc) as documented in \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_datasource_sql_binding}{Binding by Value and Placeholder}}

This method does not retain the datasource connection for the current thread if one was not already allocated before this method is called, so to execute select statements that begin a transaction (such as {\ttfamily \char`\"{}select for update\char`\"{}}), execute \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_datasource_pool_a04c351f440ddfdbe79f9b4ef26608e6f}{Datasource\+Pool\+::begin\+Transaction()}} first to ensure that the connection is dedicated to the calling thread.


\begin{DoxyParams}{Parameters}
{\em sql} & The S\+QL command to execute on the server \\
\hline
{\em vargs} & Include any values to be bound (using {\ttfamily \%v} in the command string) or placeholder specifications (using {\ttfamily \+:}{\itshape key\+\_\+name} in the command string) in order after the command string\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
Normally returns a list (rows) of hash (where the keys are the column names of each row) or \mbox{\hyperlink{basic_data_types_nothing}{N\+O\+T\+H\+I\+NG}} if no rows are found for the query, however some D\+BI drivers allow any S\+QL statement to be executed through this method (not only select statements), in this case other data types can be returned
\end{DoxyReturn}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}
*list<auto> list = db.vselectRows(\textcolor{stringliteral}{"select * from example\_table where id = %v and type = %v"}, arg\_list);
\end{DoxyCode}

\end{DoxyParagraph}
\begin{DoxyNote}{Note}
see the documentation for the D\+BI driver being used for additional possible exceptions
\end{DoxyNote}
\begin{DoxySeeAlso}{See also}
\mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_datasource_pool_a9298e44c0af5bb93330c929b47cde5c9}{Datasource\+Pool\+::select\+Rows()}} 
\end{DoxySeeAlso}


Implements \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_abstract_datasource_afe2104486bab27d21e47760edae79cf3}{Qore\+::\+S\+Q\+L\+::\+Abstract\+Datasource}}.

