\hypertarget{namespace_qore_1_1_s_q_l}{}\doxysection{Qore\+::SQL Namespace Reference}
\label{namespace_qore_1_1_s_q_l}\index{Qore::SQL@{Qore::SQL}}


\mbox{\hyperlink{namespace_qore_1_1_s_q_l}{SQL}} namespace.  


\doxysubsection*{Classes}
\begin{DoxyCompactItemize}
\item 
class \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_abstract_datasource}{Abstract\+Datasource}}
\begin{DoxyCompactList}\small\item\em This class defines an abstract interface for database access, inherited by both the \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_datasource}{Datasource}} and \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_datasource_pool}{Datasource\+Pool}} classes. \end{DoxyCompactList}\item 
class \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_abstract_s_q_l_statement}{Abstract\+SQLStatement}}
\begin{DoxyCompactList}\small\item\em This class defines an abstract interface for the \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_s_q_l_statement}{SQLStatement}} class. \end{DoxyCompactList}\item 
class \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_datasource}{Datasource}}
\begin{DoxyCompactList}\small\item\em This class provides the Qore interface to databases. \end{DoxyCompactList}\item 
class \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_datasource_pool}{Datasource\+Pool}}
\begin{DoxyCompactList}\small\item\em Provides transparent per-\/thread, per-\/transaction datasource connection pooling. \end{DoxyCompactList}\item 
class \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_s_q_l_statement}{SQLStatement}}
\begin{DoxyCompactList}\small\item\em The \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_s_q_l_statement}{SQLStatement}} class provides the most flexibilty for executing \mbox{\hyperlink{namespace_qore_1_1_s_q_l}{SQL}} on a database server. \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsection*{Functions}
\begin{DoxyCompactItemize}
\item 
\+\_\+\+\_\+7\+\_\+ \mbox{\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int}} \mbox{\hyperlink{group__old__dbi__functions_ga330acb764484b16529d4f25960c45fa8}{get\+DBIDriver\+Capabilities}} (\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} driver)
\begin{DoxyCompactList}\small\item\em Returns an integer representing the capabilities of a DBI driver binary-\/\+OR\textquotesingle{}ed together (see \mbox{\hyperlink{group__dbi__capabilities}{DBI Capability Constants}}) or \mbox{\hyperlink{basic_data_types_nothing}{NOTHING}} if the driver is not already loaded. \end{DoxyCompactList}\item 
nothing \mbox{\hyperlink{group__old__dbi__functions_gaec342f12d867758d49be57c1bf2a39cf}{get\+DBIDriver\+Capabilities}} ()
\begin{DoxyCompactList}\small\item\em This function variant does nothing at all; it is only included for backwards-\/compatibility with qore prior to version 0.\+8.\+0 for functions that would ignore type errors in arguments. \end{DoxyCompactList}\item 
\+\_\+\+\_\+7\+\_\+ \mbox{\hyperlink{group__type__conversion__functions_ga9a401e5112c58f63c05e7ee1e15968ef}{list}}$<$ \mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} $>$ \mbox{\hyperlink{group__old__dbi__functions_gae55ebe463d39b288e45429ce3d16a6e1}{get\+DBIDriver\+Capability\+List}} (\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} driver)
\begin{DoxyCompactList}\small\item\em Returns a list of each capability supported by the given DBI driver (see \mbox{\hyperlink{group__dbi__capabilities}{DBI Capability Constants}}) or \mbox{\hyperlink{basic_data_types_nothing}{NOTHING}} if the driver cannot be found. \end{DoxyCompactList}\item 
nothing \mbox{\hyperlink{group__old__dbi__functions_ga9cbf88f872bbaebcd1d228efef180117}{get\+DBIDriver\+Capability\+List}} ()
\begin{DoxyCompactList}\small\item\em This function variant does nothing at all; it is only included for backwards-\/compatibility with qore prior to version 0.\+8.\+0 for functions that would ignore type errors in arguments. \end{DoxyCompactList}\item 
\+\_\+\+\_\+7\+\_\+ \mbox{\hyperlink{group__type__conversion__functions_ga9a401e5112c58f63c05e7ee1e15968ef}{list}}$<$ \mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} $>$ \mbox{\hyperlink{group__old__dbi__functions_ga8d4cb418f509b5dab2d2e7fc422b5bb8}{get\+DBIDriver\+List}} ()
\begin{DoxyCompactList}\small\item\em Returns a list of strings of DBI drivers currently loaded or \mbox{\hyperlink{basic_data_types_nothing}{NOTHING}} if no drivers are loaded. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__type__conversion__functions_ga24ee71727f0785d3b826833ed6f5e2ee}{hash}} \mbox{\hyperlink{group__old__dbi__functions_gab8f5a597374024a8c78e767dbfcafc15}{parse\+Datasource}} (\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} ds)
\begin{DoxyCompactList}\small\item\em Returns a \mbox{\hyperlink{group__dbi__functions_datasource_hash}{datasource hash}} of the components of a datasource string. \end{DoxyCompactList}\item 
nothing \mbox{\hyperlink{group__old__dbi__functions_gaba3a2421c3d2b492c9494f346c13da1c}{parse\+Datasource}} ()
\begin{DoxyCompactList}\small\item\em This function variant does nothing at all; it is only included for backwards-\/compatibility with qore prior to version 0.\+8.\+0 for functions that would ignore type errors in arguments. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int}} \mbox{\hyperlink{group__dbi__functions_ga40597983f24f3b0edc06149246d1cbe2}{dbi\+\_\+get\+\_\+driver\+\_\+capabilities}} (\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} driver)
\begin{DoxyCompactList}\small\item\em Returns an integer representing the capabilities of a DBI driver binary-\/\+OR\textquotesingle{}ed together (see \mbox{\hyperlink{group__dbi__capabilities}{DBI Capability Constants}}) or 0 if the driver is not already loaded. \end{DoxyCompactList}\item 
\+\_\+\+\_\+7\+\_\+ \mbox{\hyperlink{group__type__conversion__functions_ga9a401e5112c58f63c05e7ee1e15968ef}{list}}$<$ \mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} $>$ \mbox{\hyperlink{group__dbi__functions_gafc25fc4c8fd5f41b9637cb6a925697f7}{dbi\+\_\+get\+\_\+driver\+\_\+capability\+\_\+list}} (\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} driver)
\begin{DoxyCompactList}\small\item\em Returns a list of each capability supported by the given DBI driver (see \mbox{\hyperlink{group__dbi__capabilities}{DBI Capability Constants}}) or \mbox{\hyperlink{basic_data_types_nothing}{NOTHING}} if the driver cannot be found. \end{DoxyCompactList}\item 
\+\_\+\+\_\+7\+\_\+ \mbox{\hyperlink{group__type__conversion__functions_ga9a401e5112c58f63c05e7ee1e15968ef}{list}}$<$ \mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} $>$ \mbox{\hyperlink{group__dbi__functions_ga21d1d28f19884121c569a99394ec901a}{dbi\+\_\+get\+\_\+driver\+\_\+list}} ()
\begin{DoxyCompactList}\small\item\em Returns a list of strings of DBI drivers currently loaded or \mbox{\hyperlink{basic_data_types_nothing}{NOTHING}} if no drivers are loaded. \end{DoxyCompactList}\item 
\+\_\+\+\_\+7\+\_\+ \mbox{\hyperlink{group__type__conversion__functions_ga24ee71727f0785d3b826833ed6f5e2ee}{hash}}$<$ auto $>$ \mbox{\hyperlink{group__dbi__functions_ga3e473d5b62aa2bf1fbd9fdde1cd4cba3}{dbi\+\_\+get\+\_\+driver\+\_\+options}} (\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} driver)
\begin{DoxyCompactList}\small\item\em returns a hash of driver options \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__type__conversion__functions_ga24ee71727f0785d3b826833ed6f5e2ee}{hash}}$<$ auto $>$ \mbox{\hyperlink{group__dbi__functions_ga5bc0c2cfb4f1bfbf73c527f9441a6dbe}{parse\+\_\+datasource}} (\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} ds)
\begin{DoxyCompactList}\small\item\em Returns a \mbox{\hyperlink{group__dbi__functions_datasource_hash}{datasource hash}} of the components of a datasource string. \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsection*{Variables}
\begin{DoxyCompactItemize}
\item 
const {\bfseries DSDB2} = \char`\"{}db2\char`\"{}
\begin{DoxyCompactList}\small\item\em for the {\ttfamily \char`\"{}db2\char`\"{}} driver \end{DoxyCompactList}\item 
const {\bfseries DSFree\+TDS} = \char`\"{}freetds\char`\"{}
\begin{DoxyCompactList}\small\item\em for the {\ttfamily \char`\"{}freetds\char`\"{}} driver \end{DoxyCompactList}\item 
const {\bfseries DSJDBC} = \char`\"{}jdbc\char`\"{}
\begin{DoxyCompactList}\small\item\em for the {\ttfamily \char`\"{}jdbc\char`\"{}} driver \end{DoxyCompactList}\item 
const {\bfseries DSMSSQL} = \char`\"{}freetds\char`\"{}
\begin{DoxyCompactList}\small\item\em another constant for the {\ttfamily \char`\"{}freetds\char`\"{}} driver \end{DoxyCompactList}\item 
const {\bfseries DSMy\+SQL} = \char`\"{}mysql\char`\"{}
\begin{DoxyCompactList}\small\item\em for the {\ttfamily \char`\"{}mysql\char`\"{}} driver \end{DoxyCompactList}\item 
const {\bfseries DSOracle} = \char`\"{}oracle\char`\"{}
\begin{DoxyCompactList}\small\item\em for the {\ttfamily \char`\"{}oracle\char`\"{}} driver \end{DoxyCompactList}\item 
const {\bfseries DSPGSQL} = \char`\"{}pgsql\char`\"{}
\begin{DoxyCompactList}\small\item\em for the {\ttfamily \char`\"{}pgsql\char`\"{}} driver \end{DoxyCompactList}\item 
const {\bfseries DSSQLite3} = \char`\"{}sqlite3\char`\"{}
\begin{DoxyCompactList}\small\item\em for the {\ttfamily \char`\"{}sqlite3\char`\"{}} driver \end{DoxyCompactList}\item 
const {\bfseries DSSybase} = \char`\"{}sybase\char`\"{}
\begin{DoxyCompactList}\small\item\em for the {\ttfamily \char`\"{}sybase\char`\"{}} driver \end{DoxyCompactList}\item 
const {\bfseries DBI\+\_\+\+CAP\+\_\+\+AUTORECONNECT} = DBI\+\_\+\+CAP\+\_\+\+AUTORECONNECT
\begin{DoxyCompactList}\small\item\em Indicates that the DBI driver supports automatically/transparently reconnecting to the server if the connection is lost while not in a transaction. \end{DoxyCompactList}\item 
const {\bfseries DBI\+\_\+\+CAP\+\_\+\+BIND\+\_\+\+BY\+\_\+\+PLACEHOLDER} = DBI\+\_\+\+CAP\+\_\+\+BIND\+\_\+\+BY\+\_\+\+PLACEHOLDER
\begin{DoxyCompactList}\small\item\em Indicates that the DBI driver supports binding placeholder buffers when executing SQL to retrieve data from queries and procedures, etc. \end{DoxyCompactList}\item 
const {\bfseries DBI\+\_\+\+CAP\+\_\+\+BIND\+\_\+\+BY\+\_\+\+VALUE} = DBI\+\_\+\+CAP\+\_\+\+BIND\+\_\+\+BY\+\_\+\+VALUE
\begin{DoxyCompactList}\small\item\em Indicates that the DBI driver supports directly binding qore values into queries using the {\ttfamily \%v} placeholder in the query string. \end{DoxyCompactList}\item 
const {\bfseries DBI\+\_\+\+CAP\+\_\+\+CHARSET\+\_\+\+SUPPORT} = DBI\+\_\+\+CAP\+\_\+\+CHARSET\+\_\+\+SUPPORT
\begin{DoxyCompactList}\small\item\em Indicates that the DBI driver supports proper character encoding conversions. \end{DoxyCompactList}\item 
const {\bfseries DBI\+\_\+\+CAP\+\_\+\+EVENTS} = DBI\+\_\+\+CAP\+\_\+\+EVENTS
\begin{DoxyCompactList}\small\item\em Indicates that the DBI driver supports the event API. \end{DoxyCompactList}\item 
const {\bfseries DBI\+\_\+\+CAP\+\_\+\+HAS\+\_\+\+ARRAY\+\_\+\+BIND} = DBI\+\_\+\+CAP\+\_\+\+HAS\+\_\+\+ARRAY\+\_\+\+BIND
\begin{DoxyCompactList}\small\item\em Indicates that the DBI driver supports binding arrays by value for bulk DML operations. \end{DoxyCompactList}\item 
const {\bfseries DBI\+\_\+\+CAP\+\_\+\+HAS\+\_\+\+DESCRIBE} = DBI\+\_\+\+CAP\+\_\+\+HAS\+\_\+\+DESCRIBE
\begin{DoxyCompactList}\small\item\em Indicates that the DBI driver supports the describe method. \end{DoxyCompactList}\item 
const {\bfseries DBI\+\_\+\+CAP\+\_\+\+HAS\+\_\+\+EXECRAW} = DBI\+\_\+\+CAP\+\_\+\+HAS\+\_\+\+EXECRAW
\begin{DoxyCompactList}\small\item\em Indicates that the DBI driver supports the \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_datasource_a4ec5865609884af9b0498a7f45b1042f}{Datasource\+::exec\+Raw()}} and \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_datasource_pool_a3e7e022470ddc471f045ab29ee25c4d7}{Datasource\+Pool\+::exec\+Raw()}} methods. \end{DoxyCompactList}\item 
const {\bfseries DBI\+\_\+\+CAP\+\_\+\+HAS\+\_\+\+NUMBER\+\_\+\+SUPPORT} = DBI\+\_\+\+CAP\+\_\+\+HAS\+\_\+\+NUMBER\+\_\+\+SUPPORT
\begin{DoxyCompactList}\small\item\em Indicates that the DBI driver supports arbitrary-\/precision numeric support for binding and retrieving values. \end{DoxyCompactList}\item 
const {\bfseries DBI\+\_\+\+CAP\+\_\+\+HAS\+\_\+\+OPTION\+\_\+\+SUPPORT} = DBI\+\_\+\+CAP\+\_\+\+HAS\+\_\+\+OPTION\+\_\+\+SUPPORT
\begin{DoxyCompactList}\small\item\em Indicates that the DBI driver supports the new driver option API. \end{DoxyCompactList}\item 
const \mbox{\hyperlink{group__dbi__capabilities_ga91b90789d24991b1eebce9c11491f015}{DBI\+\_\+\+CAP\+\_\+\+HAS\+\_\+\+RESULTSET\+\_\+\+OUTPUT}} = DBI\+\_\+\+CAP\+\_\+\+HAS\+\_\+\+RESULTSET\+\_\+\+OUTPUT
\begin{DoxyCompactList}\small\item\em Indicates that the DBI driver supports \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_datasource_resultset_output_binding}{result set}} output binding with a \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_s_q_l_statement}{SQLStatement}} output variable. \end{DoxyCompactList}\item 
const {\bfseries DBI\+\_\+\+CAP\+\_\+\+HAS\+\_\+\+SELECT\+\_\+\+ROW} = DBI\+\_\+\+CAP\+\_\+\+HAS\+\_\+\+SELECT\+\_\+\+ROW
\begin{DoxyCompactList}\small\item\em Indicates that the DBI driver supports a native select\+Row() method implementation. \end{DoxyCompactList}\item 
const {\bfseries DBI\+\_\+\+CAP\+\_\+\+HAS\+\_\+\+STATEMENT} = DBI\+\_\+\+CAP\+\_\+\+HAS\+\_\+\+STATEMENT
\begin{DoxyCompactList}\small\item\em Indicates that the DBI driver supports the prepared statement interface (the \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_s_q_l_statement}{SQLStatement}} class) \end{DoxyCompactList}\item 
const {\bfseries DBI\+\_\+\+CAP\+\_\+\+LOB\+\_\+\+SUPPORT} = DBI\+\_\+\+CAP\+\_\+\+LOB\+\_\+\+SUPPORT
\begin{DoxyCompactList}\small\item\em Indicates that the DBI driver supports LOB columns (BLOBs and CLOBs, for example) \end{DoxyCompactList}\item 
const {\bfseries DBI\+\_\+\+CAP\+\_\+\+SERVER\+\_\+\+TIME\+\_\+\+ZONE} = DBI\+\_\+\+CAP\+\_\+\+SERVER\+\_\+\+TIME\+\_\+\+ZONE
\begin{DoxyCompactList}\small\item\em Indicates that the DBI driver supports automatically converting date/time values to the server\textquotesingle{}s presumed time zone (also implies that the driver supports the {\ttfamily \char`\"{}timezone\char`\"{}} option) and tagging date/time values with the same; this is independent from the client\textquotesingle{}s current time zone setting. \end{DoxyCompactList}\item 
const {\bfseries DBI\+\_\+\+CAP\+\_\+\+STORED\+\_\+\+PROCEDURES} = DBI\+\_\+\+CAP\+\_\+\+STORED\+\_\+\+PROCEDURES
\begin{DoxyCompactList}\small\item\em Indicates that the DBI driver supports stored procedure execution. \end{DoxyCompactList}\item 
const {\bfseries DBI\+\_\+\+CAP\+\_\+\+TIME\+\_\+\+ZONE\+\_\+\+SUPPORT} = DBI\+\_\+\+CAP\+\_\+\+TIME\+\_\+\+ZONE\+\_\+\+SUPPORT
\begin{DoxyCompactList}\small\item\em Indicates that the DBI driver supports time zones in times. \end{DoxyCompactList}\item 
const {\bfseries DBI\+\_\+\+CAP\+\_\+\+TRANSACTION\+\_\+\+MANAGEMENT} = DBI\+\_\+\+CAP\+\_\+\+TRANSACTION\+\_\+\+MANAGEMENT
\begin{DoxyCompactList}\small\item\em Indicates that the DBI driver supports transaction management. \end{DoxyCompactList}\item 
const {\bfseries BLOB} = \char`\"{}blob\char`\"{}
\begin{DoxyCompactList}\small\item\em for binding BLOB values \end{DoxyCompactList}\item 
const {\bfseries CLOB} = \char`\"{}clob\char`\"{}
\begin{DoxyCompactList}\small\item\em for binding CLOB values \end{DoxyCompactList}\item 
const {\bfseries DATE} = \char`\"{}date\char`\"{}
\begin{DoxyCompactList}\small\item\em for binding date/time values \end{DoxyCompactList}\item 
const \mbox{\hyperlink{group__sql__constants_ga85bba3f8e978509f66f08011b264e9b0}{DECIMAL}} = \char`\"{}number\char`\"{}
\begin{DoxyCompactList}\small\item\em for binding decimal values as a number \end{DoxyCompactList}\item 
const \mbox{\hyperlink{group__sql__constants_ga8d5c7d08373364f4773f65e69063cd04}{NUMBER}} = \char`\"{}number\char`\"{}
\begin{DoxyCompactList}\small\item\em for binding number values as a number \end{DoxyCompactList}\item 
const \mbox{\hyperlink{group__sql__constants_ga223c3ce9da5ccb29dd35eab11f161f9f}{NUMERIC}} = \char`\"{}number\char`\"{}
\begin{DoxyCompactList}\small\item\em for binding numeric values as a number \end{DoxyCompactList}\item 
const \mbox{\hyperlink{group__sql__constants_ga9d23a1d69fcb188296a231a36c6b6da2}{RESULTSET}} = \char`\"{}resultset\char`\"{}
\begin{DoxyCompactList}\small\item\em For binding \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_datasource_resultset_output_binding}{result set}} placeholders. \end{DoxyCompactList}\item 
const {\bfseries VARCHAR} = \char`\"{}string\char`\"{}
\begin{DoxyCompactList}\small\item\em for binding string values \end{DoxyCompactList}\end{DoxyCompactItemize}


\doxysubsection{Detailed Description}
\mbox{\hyperlink{namespace_qore_1_1_s_q_l}{SQL}} namespace. 