\hypertarget{class_qore_1_1_s_q_l_1_1_abstract_s_q_l_statement}{}\doxysection{Qore\+::SQL\+::Abstract\+SQLStatement Class Reference}
\label{class_qore_1_1_s_q_l_1_1_abstract_s_q_l_statement}\index{Qore::SQL::AbstractSQLStatement@{Qore::SQL::AbstractSQLStatement}}


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.  




{\ttfamily \#include $<$QC\+\_\+\+Abstract\+SQLStatement.\+dox.\+h$>$}



Inheritance diagram for Qore\+::SQL\+::Abstract\+SQLStatement\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=261pt]{class_qore_1_1_s_q_l_1_1_abstract_s_q_l_statement__inherit__graph}
\end{center}
\end{figure}
\doxysubsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
abstract bool \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_abstract_s_q_l_statement_aa6e9c12936aca9c1c6b4eb151cd3d0a7}{active}} ()
\begin{DoxyCompactList}\small\item\em Returns \mbox{\hyperlink{basic_data_types_True}{True}} if the object is currently active and has a connection or transaction lock allocated to it, or \mbox{\hyperlink{basic_data_types_False}{False}} if not. \end{DoxyCompactList}\item 
abstract \mbox{\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int}} \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_abstract_s_q_l_statement_af32268f269fc8e29cb4966ec70d40b26}{affected\+Rows}} ()
\begin{DoxyCompactList}\small\item\em Returns the number of rows affected by the last call to \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_abstract_s_q_l_statement_a1fd3fd0ce29a4eb110dd6ff416195bda}{Abstract\+SQLStatement\+::exec()}} \end{DoxyCompactList}\item 
abstract nothing \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_abstract_s_q_l_statement_a50fe98b66f009c1fce620ce42dc77c62}{begin\+Transaction}} ()
\begin{DoxyCompactList}\small\item\em Manually starts a transaction and allocates a connection or grabs the transaction lock according to the object used in the Abstract\+SQLStatement\+::constructor() \end{DoxyCompactList}\item 
abstract nothing \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_abstract_s_q_l_statement_a53fbcc157b43c9f733e738f033c5b133}{bind}} (...)
\begin{DoxyCompactList}\small\item\em Binds placeholder buffer specifications and values to buffers defined in \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_abstract_s_q_l_statement_a480f30622fff523ee188297b1eebfa79}{Abstract\+SQLStatement\+::prepare()}} \end{DoxyCompactList}\item 
abstract nothing \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_abstract_s_q_l_statement_aecef7bdce44fb28daf3ffda44bd395b6}{bind\+Args}} (softlist$<$ auto $>$ vargs)
\begin{DoxyCompactList}\small\item\em Binds placeholder buffer specifications and values given as a list in the single argument to the method to buffers defined in \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_abstract_s_q_l_statement_a480f30622fff523ee188297b1eebfa79}{Abstract\+SQLStatement\+::prepare()}} \end{DoxyCompactList}\item 
abstract nothing \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_abstract_s_q_l_statement_a0311c65d5483cd9cbaf48dc59f437895}{bind\+Placeholders}} (...)
\begin{DoxyCompactList}\small\item\em Binds placeholder buffer specifications to buffers defined in \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_abstract_s_q_l_statement_a480f30622fff523ee188297b1eebfa79}{Abstract\+SQLStatement\+::prepare()}} \end{DoxyCompactList}\item 
abstract nothing \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_abstract_s_q_l_statement_a515142e47a51687427a8e6715bc35a70}{bind\+Placeholders\+Args}} (softlist$<$ auto $>$ vargs)
\begin{DoxyCompactList}\small\item\em Binds placeholder buffer specifications given as a list in the single argument to the method to buffers defined in \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_abstract_s_q_l_statement_a480f30622fff523ee188297b1eebfa79}{Abstract\+SQLStatement\+::prepare()}} \end{DoxyCompactList}\item 
abstract nothing \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_abstract_s_q_l_statement_addf98ea5bdf907ae646a7f2f8e1607c0}{bind\+Values}} (...)
\begin{DoxyCompactList}\small\item\em Binds values to value buffer specifications to buffers defined in \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_abstract_s_q_l_statement_a480f30622fff523ee188297b1eebfa79}{Abstract\+SQLStatement\+::prepare()}} \end{DoxyCompactList}\item 
abstract nothing \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_abstract_s_q_l_statement_ae80b0921b26b6455b85ae727e57b1fa0}{bind\+Values\+Args}} (softlist$<$ auto $>$ vargs)
\begin{DoxyCompactList}\small\item\em Binds values to value buffer specifications given as a list in the single argument to the method to value buffers defined in \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_abstract_s_q_l_statement_a480f30622fff523ee188297b1eebfa79}{Abstract\+SQLStatement\+::prepare()}} \end{DoxyCompactList}\item 
abstract nothing \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_abstract_s_q_l_statement_a3be914ba53e691d4ee4655973de3718b}{close}} ()
\begin{DoxyCompactList}\small\item\em Closes the statement if it is open, however this method does not release the connection or transaction lock. \end{DoxyCompactList}\item 
abstract nothing \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_abstract_s_q_l_statement_a721847f8231a8e1539542dbe5bca606d}{commit}} ()
\begin{DoxyCompactList}\small\item\em Commits the transaction, releases the connection or the transaction lock according to the object used in the Abstract\+SQLStatement\+::constructor(), and closes the \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_s_q_l_statement}{SQLStatement}}. \end{DoxyCompactList}\item 
abstract bool \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_abstract_s_q_l_statement_afb9a48701323d1c620f4bfcf40e4ba78}{current\+Thread\+In\+Transaction}} ()
\begin{DoxyCompactList}\small\item\em Returns \mbox{\hyperlink{basic_data_types_True}{True}} if the current thread is in a transaction (i.\+e. holds the transaction lock), \mbox{\hyperlink{basic_data_types_False}{False}} if not. \end{DoxyCompactList}\item 
abstract nothing \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_abstract_s_q_l_statement_a7f767fcdc63e67b201acfa73cc3c5b82}{define}} ()
\begin{DoxyCompactList}\small\item\em Performs an explicit define operation on the \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_s_q_l_statement}{SQLStatement}}. \end{DoxyCompactList}\item 
abstract \mbox{\hyperlink{group__type__conversion__functions_ga24ee71727f0785d3b826833ed6f5e2ee}{hash}}$<$ auto $>$ \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_abstract_s_q_l_statement_a37f73061df67a487ec8688dbc91e3413}{describe}} ()
\begin{DoxyCompactList}\small\item\em Describes columns in the statement result. \end{DoxyCompactList}\item 
abstract nothing \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_abstract_s_q_l_statement_a1fd3fd0ce29a4eb110dd6ff416195bda}{exec}} (...)
\begin{DoxyCompactList}\small\item\em Executes the bound statement with any bound buffers, also optionally allows binding placeholder buffer specifications and values to buffers defined in \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_abstract_s_q_l_statement_a480f30622fff523ee188297b1eebfa79}{Abstract\+SQLStatement\+::prepare()}} before executing the statement. \end{DoxyCompactList}\item 
abstract nothing \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_abstract_s_q_l_statement_aaf3f423da01bbe18b95eaf0cb53053f3}{exec\+Args}} (softlist$<$ auto $>$ vargs)
\begin{DoxyCompactList}\small\item\em Executes the bound statement with any bound buffers, also optionally allows binding placeholder buffer specifications and values given as a list in the single argument to the method to buffers defined in \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_abstract_s_q_l_statement_a480f30622fff523ee188297b1eebfa79}{Abstract\+SQLStatement\+::prepare()}} \end{DoxyCompactList}\item 
abstract \mbox{\hyperlink{group__type__conversion__functions_ga24ee71727f0785d3b826833ed6f5e2ee}{hash}}$<$ auto $>$ \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_abstract_s_q_l_statement_ac66790469493b564798f50f03bf2acc9}{fetch\+Columns}} (softint rows=-\/1)
\begin{DoxyCompactList}\small\item\em Retrieves a block of rows as a hash of lists with the maximum number of rows determined by the argument passed; automatically advances the row pointer; with this call it is not necessary to call \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_abstract_s_q_l_statement_a45f7bd62a339149daa3f859012eb626f}{Abstract\+SQLStatement\+::next()}}. \end{DoxyCompactList}\item 
abstract \+\_\+\+\_\+7\+\_\+ \mbox{\hyperlink{group__type__conversion__functions_ga24ee71727f0785d3b826833ed6f5e2ee}{hash}}$<$ auto $>$ \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_abstract_s_q_l_statement_a80ff8fb63f5cb85f4df46cf4a6c76a7e}{fetch\+Row}} ()
\begin{DoxyCompactList}\small\item\em Retrieves the current row as a hash where the keys are the column names and the values are the column values. \end{DoxyCompactList}\item 
abstract \mbox{\hyperlink{group__type__conversion__functions_ga9a401e5112c58f63c05e7ee1e15968ef}{list}}$<$ auto $>$ \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_abstract_s_q_l_statement_aae949362a3f374fd889a002d663430b3}{fetch\+Rows}} (softint rows=-\/1)
\begin{DoxyCompactList}\small\item\em Retrieves a block of rows as a list of hashes with the maximum number of rows determined by the argument passed; automatically advances the row pointer; with this call it is not necessary to call \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_abstract_s_q_l_statement_a45f7bd62a339149daa3f859012eb626f}{Abstract\+SQLStatement\+::next()}} \end{DoxyCompactList}\item 
abstract \mbox{\hyperlink{group__type__conversion__functions_ga24ee71727f0785d3b826833ed6f5e2ee}{hash}}$<$ auto $>$ \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_abstract_s_q_l_statement_a105c1c02eb3d3801444dc316d1924005}{get\+Output}} ()
\begin{DoxyCompactList}\small\item\em Retrieves output buffers as a hash; result sets will be returned as hashes of lists. \end{DoxyCompactList}\item 
abstract \mbox{\hyperlink{group__type__conversion__functions_ga24ee71727f0785d3b826833ed6f5e2ee}{hash}}$<$ auto $>$ \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_abstract_s_q_l_statement_a46b3bbb2ed34884cce469fa4c5b65900}{get\+Output\+Rows}} ()
\begin{DoxyCompactList}\small\item\em Retrieves output buffers as a hash; result sets will be returned as lists of hashes. \end{DoxyCompactList}\item 
abstract \+\_\+\+\_\+7\+\_\+ \mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_abstract_s_q_l_statement_aa351dd140d5e1a6147a3a34e92614493}{get\+SQL}} ()
\begin{DoxyCompactList}\small\item\em Returns the current \mbox{\hyperlink{namespace_qore_1_1_s_q_l}{SQL}} string set with the call to \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_abstract_s_q_l_statement_a480f30622fff523ee188297b1eebfa79}{Abstract\+SQLStatement\+::prepare()}} or \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_abstract_s_q_l_statement_a0f5d70f9678cd823fb1eb7aa99052fdd}{Abstract\+SQLStatement\+::prepare\+Raw()}} or \mbox{\hyperlink{basic_data_types_nothing}{NOTHING}} if no \mbox{\hyperlink{namespace_qore_1_1_s_q_l}{SQL}} has been set. \end{DoxyCompactList}\item 
abstract \+\_\+\+\_\+7\+\_\+ \mbox{\hyperlink{group__type__conversion__functions_ga24ee71727f0785d3b826833ed6f5e2ee}{hash}}$<$ auto $>$ \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_abstract_s_q_l_statement_a97c746cfb641d4e3370c491de36af137}{get\+Value}} ()
\begin{DoxyCompactList}\small\item\em Retrieves the current row as a hash where the keys are the column names and the values are the column values. \end{DoxyCompactList}\item 
abstract auto \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_abstract_s_q_l_statement_a5ad904da252b6bf7ebf80a9262c8b827}{member\+Gate}} (\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} member)
\begin{DoxyCompactList}\small\item\em Returns the value of the given column for the current row. \end{DoxyCompactList}\item 
abstract bool \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_abstract_s_q_l_statement_a45f7bd62a339149daa3f859012eb626f}{next}} ()
\begin{DoxyCompactList}\small\item\em Increments the row pointer when retrieving rows from a select statement; returns \mbox{\hyperlink{basic_data_types_True}{True}} if there is a row to retrieve, \mbox{\hyperlink{basic_data_types_False}{False}} if not. \end{DoxyCompactList}\item 
abstract nothing \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_abstract_s_q_l_statement_a480f30622fff523ee188297b1eebfa79}{prepare}} (\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} sql,...)
\begin{DoxyCompactList}\small\item\em Saves an \mbox{\hyperlink{namespace_qore_1_1_s_q_l}{SQL}} statement that will be prepared and executed later, along with optional arguments. \end{DoxyCompactList}\item 
abstract nothing \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_abstract_s_q_l_statement_a0f5d70f9678cd823fb1eb7aa99052fdd}{prepare\+Raw}} (\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} sql)
\begin{DoxyCompactList}\small\item\em Saves an \mbox{\hyperlink{namespace_qore_1_1_s_q_l}{SQL}} statement that will be prepared and executed later. \end{DoxyCompactList}\item 
abstract nothing \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_abstract_s_q_l_statement_ad243d89229ee65a43fe33d29137217c4}{rollback}} ()
\begin{DoxyCompactList}\small\item\em Closes the \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_s_q_l_statement}{SQLStatement}}, performs a transaction rollback, and releases the connection or the transaction lock according to the object used in the Abstract\+SQLStatement\+::constructor(), and closes the \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_s_q_l_statement}{SQLStatement}}. \end{DoxyCompactList}\item 
abstract bool \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_abstract_s_q_l_statement_ac43800cdf66d8a1e021989194d330306}{valid}} ()
\begin{DoxyCompactList}\small\item\em returns \mbox{\hyperlink{basic_data_types_True}{True}} if the object is currently pointing at a valid element, \mbox{\hyperlink{basic_data_types_False}{False}} if not (use when iterating with \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_abstract_s_q_l_statement_a45f7bd62a339149daa3f859012eb626f}{Abstract\+SQLStatement\+::next()}}) \end{DoxyCompactList}\end{DoxyCompactItemize}


\doxysubsection{Detailed Description}
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. 

\begin{DoxyParagraph}{Restrictions\+:}
\mbox{\hyperlink{group__parse__options_gac496a9d9bcf9d5c626c8c267c73a83bc}{Qore\+::\+PO\+\_\+\+NO\+\_\+\+DATABASE}}
\end{DoxyParagraph}
\begin{DoxySince}{Since}
Qore 0.\+9.\+0 
\end{DoxySince}


\doxysubsection{Member Function Documentation}
\mbox{\Hypertarget{class_qore_1_1_s_q_l_1_1_abstract_s_q_l_statement_aa6e9c12936aca9c1c6b4eb151cd3d0a7}\label{class_qore_1_1_s_q_l_1_1_abstract_s_q_l_statement_aa6e9c12936aca9c1c6b4eb151cd3d0a7}} 
\index{Qore::SQL::AbstractSQLStatement@{Qore::SQL::AbstractSQLStatement}!active@{active}}
\index{active@{active}!Qore::SQL::AbstractSQLStatement@{Qore::SQL::AbstractSQLStatement}}
\doxysubsubsection{\texorpdfstring{active()}{active()}}
{\footnotesize\ttfamily abstract bool Qore\+::\+SQL\+::\+Abstract\+SQLStatement\+::active (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [pure virtual]}}



Returns \mbox{\hyperlink{basic_data_types_True}{True}} if the object is currently active and has a connection or transaction lock allocated to it, or \mbox{\hyperlink{basic_data_types_False}{False}} if not. 

\begin{DoxyReturn}{Returns}
\mbox{\hyperlink{basic_data_types_True}{True}} if the object is currently active and has a connection or transaction lock allocated to it, or \mbox{\hyperlink{basic_data_types_False}{False}} if not
\end{DoxyReturn}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}{0}
\DoxyCodeLine{\textcolor{keywordflow}{if} (stmt.active())}
\DoxyCodeLine{    stmt.commit();}

\end{DoxyCode}
 
\end{DoxyParagraph}


Implemented in \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_s_q_l_statement_ab2435b87ba94bcd5b064084c0930d92c}{Qore\+::\+SQL\+::\+SQLStatement}}.

\mbox{\Hypertarget{class_qore_1_1_s_q_l_1_1_abstract_s_q_l_statement_af32268f269fc8e29cb4966ec70d40b26}\label{class_qore_1_1_s_q_l_1_1_abstract_s_q_l_statement_af32268f269fc8e29cb4966ec70d40b26}} 
\index{Qore::SQL::AbstractSQLStatement@{Qore::SQL::AbstractSQLStatement}!affectedRows@{affectedRows}}
\index{affectedRows@{affectedRows}!Qore::SQL::AbstractSQLStatement@{Qore::SQL::AbstractSQLStatement}}
\doxysubsubsection{\texorpdfstring{affectedRows()}{affectedRows()}}
{\footnotesize\ttfamily abstract \mbox{\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int}} Qore\+::\+SQL\+::\+Abstract\+SQLStatement\+::affected\+Rows (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [pure virtual]}}



Returns the number of rows affected by the last call to \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_abstract_s_q_l_statement_a1fd3fd0ce29a4eb110dd6ff416195bda}{Abstract\+SQLStatement\+::exec()}} 

\begin{DoxyReturn}{Returns}
the number of rows affected by the last call to \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_abstract_s_q_l_statement_a1fd3fd0ce29a4eb110dd6ff416195bda}{Abstract\+SQLStatement\+::exec()}}
\end{DoxyReturn}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}{0}
\DoxyCodeLine{int rc = stmt.affectedRows();}

\end{DoxyCode}

\end{DoxyParagraph}

\begin{DoxyExceptions}{Exceptions}
{\em SQLSTATEMENT-\/\+ERROR} & No SQL has been set with \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_abstract_s_q_l_statement_a480f30622fff523ee188297b1eebfa79}{Abstract\+SQLStatement\+::prepare()}} or \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_abstract_s_q_l_statement_a0f5d70f9678cd823fb1eb7aa99052fdd}{Abstract\+SQLStatement\+::prepare\+Raw()}}\\
\hline
\end{DoxyExceptions}
\begin{DoxyNote}{Note}
Exceptions could be thrown by the DBI driver when the statement is prepared or when attempting to bind the given arguments to buffer specifications or when the statement is executed; see the relevant DBI driver docs for more information 
\end{DoxyNote}


Implemented in \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_s_q_l_statement_a62e2cbca10b9b848b26fd7ebfa5dd753}{Qore\+::\+SQL\+::\+SQLStatement}}.

\mbox{\Hypertarget{class_qore_1_1_s_q_l_1_1_abstract_s_q_l_statement_a50fe98b66f009c1fce620ce42dc77c62}\label{class_qore_1_1_s_q_l_1_1_abstract_s_q_l_statement_a50fe98b66f009c1fce620ce42dc77c62}} 
\index{Qore::SQL::AbstractSQLStatement@{Qore::SQL::AbstractSQLStatement}!beginTransaction@{beginTransaction}}
\index{beginTransaction@{beginTransaction}!Qore::SQL::AbstractSQLStatement@{Qore::SQL::AbstractSQLStatement}}
\doxysubsubsection{\texorpdfstring{beginTransaction()}{beginTransaction()}}
{\footnotesize\ttfamily abstract nothing Qore\+::\+SQL\+::\+Abstract\+SQLStatement\+::begin\+Transaction (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [pure virtual]}}



Manually starts a transaction and allocates a connection or grabs the transaction lock according to the object used in the Abstract\+SQLStatement\+::constructor() 

\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}{0}
\DoxyCodeLine{stmt.beginTransaction();}

\end{DoxyCode}
 
\end{DoxyParagraph}


Implemented in \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_s_q_l_statement_a3fe33af34dfcd763f12d406c91305916}{Qore\+::\+SQL\+::\+SQLStatement}}.

\mbox{\Hypertarget{class_qore_1_1_s_q_l_1_1_abstract_s_q_l_statement_a53fbcc157b43c9f733e738f033c5b133}\label{class_qore_1_1_s_q_l_1_1_abstract_s_q_l_statement_a53fbcc157b43c9f733e738f033c5b133}} 
\index{Qore::SQL::AbstractSQLStatement@{Qore::SQL::AbstractSQLStatement}!bind@{bind}}
\index{bind@{bind}!Qore::SQL::AbstractSQLStatement@{Qore::SQL::AbstractSQLStatement}}
\doxysubsubsection{\texorpdfstring{bind()}{bind()}}
{\footnotesize\ttfamily abstract nothing Qore\+::\+SQL\+::\+Abstract\+SQLStatement\+::bind (\begin{DoxyParamCaption}\item[{}]{... }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [pure virtual]}}



Binds placeholder buffer specifications and values to buffers defined in \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_abstract_s_q_l_statement_a480f30622fff523ee188297b1eebfa79}{Abstract\+SQLStatement\+::prepare()}} 

If the statement has not previously been prepared with the DB API, it will be implicitly prepared by this method call. This means that this call will cause a connection to be dedicated from a \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_datasource_pool}{Datasource\+Pool}} object or the transaction lock to be grabbed with a \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_datasource}{Datasource}} object, depending on the argument to Abstract\+SQLStatement\+::constructor().

Arguments to buffer specifications must be given in the same order as declared in the string given to the \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_abstract_s_q_l_statement_a480f30622fff523ee188297b1eebfa79}{Abstract\+SQLStatement\+::prepare()}} method.

Any arguments previously bound will be released when this call is made.

\begin{DoxyNote}{Note}
You can also bind directly when calling \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_abstract_s_q_l_statement_a1fd3fd0ce29a4eb110dd6ff416195bda}{Abstract\+SQLStatement\+::exec()}} or \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_abstract_s_q_l_statement_aaf3f423da01bbe18b95eaf0cb53053f3}{Abstract\+SQLStatement\+::exec\+Args()}} as a shortcut as well, in which case it\textquotesingle{}s not necessary to make an extra call to this method.
\end{DoxyNote}

\begin{DoxyParams}{Parameters}
{\em ...} & Arguments to placeholder specifications (if required by the underlying DBI driver) and bind by value arguments\\
\hline
\end{DoxyParams}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}{0}
\DoxyCodeLine{stmt.prepare(\textcolor{stringliteral}{"{}insert into table (id, name) values (\%v, \%v)"{}});}
\DoxyCodeLine{foreach hash<auto> h \textcolor{keywordflow}{in} (l) \{}
\DoxyCodeLine{    stmt.bind(h.id, h.name);}
\DoxyCodeLine{    stmt.exec();}
\DoxyCodeLine{\}}

\end{DoxyCode}

\end{DoxyParagraph}

\begin{DoxyExceptions}{Exceptions}
{\em SQLSTATEMENT-\/\+ERROR} & No SQL has been set with \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_abstract_s_q_l_statement_a480f30622fff523ee188297b1eebfa79}{Abstract\+SQLStatement\+::prepare()}}\\
\hline
\end{DoxyExceptions}
\begin{DoxyNote}{Note}
Exceptions could be thrown by the DBI driver when the statement is prepared or when attempting to bind the given arguments to buffer specifications; see the relevant DBI driver docs for more information
\end{DoxyNote}
\begin{DoxySeeAlso}{See also}
\mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_abstract_s_q_l_statement_aecef7bdce44fb28daf3ffda44bd395b6}{Abstract\+SQLStatement\+::bind\+Args()}}, \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_abstract_s_q_l_statement_a0311c65d5483cd9cbaf48dc59f437895}{Abstract\+SQLStatement\+::bind\+Placeholders()}}, \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_abstract_s_q_l_statement_a515142e47a51687427a8e6715bc35a70}{Abstract\+SQLStatement\+::bind\+Placeholders\+Args()}}, \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_abstract_s_q_l_statement_addf98ea5bdf907ae646a7f2f8e1607c0}{Abstract\+SQLStatement\+::bind\+Values()}}, and \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_abstract_s_q_l_statement_ae80b0921b26b6455b85ae727e57b1fa0}{Abstract\+SQLStatement\+::bind\+Values\+Args()}} 
\end{DoxySeeAlso}


Implemented in \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_s_q_l_statement_ae42a182f328c30f24a8092e5891631a3}{Qore\+::\+SQL\+::\+SQLStatement}}.

\mbox{\Hypertarget{class_qore_1_1_s_q_l_1_1_abstract_s_q_l_statement_aecef7bdce44fb28daf3ffda44bd395b6}\label{class_qore_1_1_s_q_l_1_1_abstract_s_q_l_statement_aecef7bdce44fb28daf3ffda44bd395b6}} 
\index{Qore::SQL::AbstractSQLStatement@{Qore::SQL::AbstractSQLStatement}!bindArgs@{bindArgs}}
\index{bindArgs@{bindArgs}!Qore::SQL::AbstractSQLStatement@{Qore::SQL::AbstractSQLStatement}}
\doxysubsubsection{\texorpdfstring{bindArgs()}{bindArgs()}}
{\footnotesize\ttfamily abstract nothing Qore\+::\+SQL\+::\+Abstract\+SQLStatement\+::bind\+Args (\begin{DoxyParamCaption}\item[{softlist$<$ auto $>$}]{vargs }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [pure virtual]}}



Binds placeholder buffer specifications and values given as a list in the single argument to the method to buffers defined in \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_abstract_s_q_l_statement_a480f30622fff523ee188297b1eebfa79}{Abstract\+SQLStatement\+::prepare()}} 

If the statement has not previously been prepared with the DB API, it will be implicitly prepared by this method call. This means that this call will cause a connection to be dedicated from a \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_datasource_pool}{Datasource\+Pool}} object or the transaction lock to be grabbed with a \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_datasource}{Datasource}} object, depending on the argument to Abstract\+SQLStatement\+::constructor().

Arguments to buffer specifications must be given in the same order as declared in the string given to the \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_abstract_s_q_l_statement_a480f30622fff523ee188297b1eebfa79}{Abstract\+SQLStatement\+::prepare()}} method.

Any arguments previously bound will be released when this call is made.

\begin{DoxyNote}{Note}
You can also bind directly when calling \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_abstract_s_q_l_statement_a1fd3fd0ce29a4eb110dd6ff416195bda}{Abstract\+SQLStatement\+::exec()}} or \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_abstract_s_q_l_statement_aaf3f423da01bbe18b95eaf0cb53053f3}{Abstract\+SQLStatement\+::exec\+Args()}} as a shortcut as well, in which case it\textquotesingle{}s not necessary to make an extra call to this method.
\end{DoxyNote}

\begin{DoxyParams}{Parameters}
{\em vargs} & Arguments to placeholder specifications (if required by the underlying DBI driver) and bind by value arguments\\
\hline
\end{DoxyParams}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}{0}
\DoxyCodeLine{stmt.prepare(\textcolor{stringliteral}{"{}insert into table (id, name) values (\%v, \%v)"{}});}
\DoxyCodeLine{foreach hash<auto> h \textcolor{keywordflow}{in} (l) \{}
\DoxyCodeLine{    list<auto> args = (h.id, h.name);}
\DoxyCodeLine{    stmt.bindArgs(args);}
\DoxyCodeLine{    stmt.exec();}
\DoxyCodeLine{\}}

\end{DoxyCode}

\end{DoxyParagraph}

\begin{DoxyExceptions}{Exceptions}
{\em SQLSTATEMENT-\/\+ERROR} & No SQL has been set with \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_abstract_s_q_l_statement_a480f30622fff523ee188297b1eebfa79}{Abstract\+SQLStatement\+::prepare()}}\\
\hline
\end{DoxyExceptions}
\begin{DoxyNote}{Note}
Exceptions could be thrown by the DBI driver when the statement is prepared or when attempting to bind the given arguments to buffer specifications; see the relevant DBI driver docs for more information
\end{DoxyNote}
\begin{DoxySeeAlso}{See also}
\mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_abstract_s_q_l_statement_a53fbcc157b43c9f733e738f033c5b133}{Abstract\+SQLStatement\+::bind()}}, \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_abstract_s_q_l_statement_a0311c65d5483cd9cbaf48dc59f437895}{Abstract\+SQLStatement\+::bind\+Placeholders()}}, \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_abstract_s_q_l_statement_a515142e47a51687427a8e6715bc35a70}{Abstract\+SQLStatement\+::bind\+Placeholders\+Args()}}, \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_abstract_s_q_l_statement_addf98ea5bdf907ae646a7f2f8e1607c0}{Abstract\+SQLStatement\+::bind\+Values()}}, and \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_abstract_s_q_l_statement_ae80b0921b26b6455b85ae727e57b1fa0}{Abstract\+SQLStatement\+::bind\+Values\+Args()}} 
\end{DoxySeeAlso}


Implemented in \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_s_q_l_statement_a6f55e9c97db5b359315ead0dc5b4effe}{Qore\+::\+SQL\+::\+SQLStatement}}.

\mbox{\Hypertarget{class_qore_1_1_s_q_l_1_1_abstract_s_q_l_statement_a0311c65d5483cd9cbaf48dc59f437895}\label{class_qore_1_1_s_q_l_1_1_abstract_s_q_l_statement_a0311c65d5483cd9cbaf48dc59f437895}} 
\index{Qore::SQL::AbstractSQLStatement@{Qore::SQL::AbstractSQLStatement}!bindPlaceholders@{bindPlaceholders}}
\index{bindPlaceholders@{bindPlaceholders}!Qore::SQL::AbstractSQLStatement@{Qore::SQL::AbstractSQLStatement}}
\doxysubsubsection{\texorpdfstring{bindPlaceholders()}{bindPlaceholders()}}
{\footnotesize\ttfamily abstract nothing Qore\+::\+SQL\+::\+Abstract\+SQLStatement\+::bind\+Placeholders (\begin{DoxyParamCaption}\item[{}]{... }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [pure virtual]}}



Binds placeholder buffer specifications to buffers defined in \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_abstract_s_q_l_statement_a480f30622fff523ee188297b1eebfa79}{Abstract\+SQLStatement\+::prepare()}} 

If the statement has not previously been prepared with the DB API, it will be implicitly prepared by this method call. This means that this call will cause a connection to be dedicated from a \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_datasource_pool}{Datasource\+Pool}} object or the transaction lock to be grabbed with a \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_datasource}{Datasource}} object, depending on the argument to Abstract\+SQLStatement\+::constructor().

Arguments to buffer specifications must be given in the same order as declared in the string given to the \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_abstract_s_q_l_statement_a480f30622fff523ee188297b1eebfa79}{Abstract\+SQLStatement\+::prepare()}} method. Only placeholder buffer specifications will be processed; value buffer specifications will be skipped by this method.

Any buffer specifications previously defined will be released when this call is made.

\begin{DoxyNote}{Note}
You can also bind buffer specifications directly when calling \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_abstract_s_q_l_statement_a1fd3fd0ce29a4eb110dd6ff416195bda}{Abstract\+SQLStatement\+::exec()}} or \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_abstract_s_q_l_statement_aaf3f423da01bbe18b95eaf0cb53053f3}{Abstract\+SQLStatement\+::exec\+Args()}} as a shortcut as well, in which case it\textquotesingle{}s not necessary to make an extra call to this method.~\newline
~\newline
 Not all DBI drivers require binding placeholders specification.
\end{DoxyNote}

\begin{DoxyParams}{Parameters}
{\em ...} & Arguments to placeholder specifications (if required by the underlying DBI driver)\\
\hline
\end{DoxyParams}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}{0}
\DoxyCodeLine{stmt.prepare(\textcolor{stringliteral}{"{}begin select sysdate into :sd from dual"{}}, Type::Date); end;}
\DoxyCodeLine{stmt.bindPlaceholders(Type::Date);}
\DoxyCodeLine{date d = stmt.getOutput().sd;}

\end{DoxyCode}

\end{DoxyParagraph}

\begin{DoxyExceptions}{Exceptions}
{\em SQLSTATEMENT-\/\+ERROR} & No SQL has been set with \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_abstract_s_q_l_statement_a480f30622fff523ee188297b1eebfa79}{Abstract\+SQLStatement\+::prepare()}}\\
\hline
\end{DoxyExceptions}
\begin{DoxyNote}{Note}
Exceptions could be thrown by the DBI driver when the statement is prepared or when attempting to bind the given arguments to buffer specifications; see the relevant DBI driver docs for more information
\end{DoxyNote}
\begin{DoxySeeAlso}{See also}
\mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_abstract_s_q_l_statement_a53fbcc157b43c9f733e738f033c5b133}{Abstract\+SQLStatement\+::bind()}}, \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_abstract_s_q_l_statement_aecef7bdce44fb28daf3ffda44bd395b6}{Abstract\+SQLStatement\+::bind\+Args()}}, \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_abstract_s_q_l_statement_a515142e47a51687427a8e6715bc35a70}{Abstract\+SQLStatement\+::bind\+Placeholders\+Args()}}, \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_abstract_s_q_l_statement_addf98ea5bdf907ae646a7f2f8e1607c0}{Abstract\+SQLStatement\+::bind\+Values()}}, and \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_abstract_s_q_l_statement_ae80b0921b26b6455b85ae727e57b1fa0}{Abstract\+SQLStatement\+::bind\+Values\+Args()}} 
\end{DoxySeeAlso}


Implemented in \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_s_q_l_statement_aacfe5d7ba6e1c1b6fcf5e7bc979c945f}{Qore\+::\+SQL\+::\+SQLStatement}}.

\mbox{\Hypertarget{class_qore_1_1_s_q_l_1_1_abstract_s_q_l_statement_a515142e47a51687427a8e6715bc35a70}\label{class_qore_1_1_s_q_l_1_1_abstract_s_q_l_statement_a515142e47a51687427a8e6715bc35a70}} 
\index{Qore::SQL::AbstractSQLStatement@{Qore::SQL::AbstractSQLStatement}!bindPlaceholdersArgs@{bindPlaceholdersArgs}}
\index{bindPlaceholdersArgs@{bindPlaceholdersArgs}!Qore::SQL::AbstractSQLStatement@{Qore::SQL::AbstractSQLStatement}}
\doxysubsubsection{\texorpdfstring{bindPlaceholdersArgs()}{bindPlaceholdersArgs()}}
{\footnotesize\ttfamily abstract nothing Qore\+::\+SQL\+::\+Abstract\+SQLStatement\+::bind\+Placeholders\+Args (\begin{DoxyParamCaption}\item[{softlist$<$ auto $>$}]{vargs }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [pure virtual]}}



Binds placeholder buffer specifications given as a list in the single argument to the method to buffers defined in \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_abstract_s_q_l_statement_a480f30622fff523ee188297b1eebfa79}{Abstract\+SQLStatement\+::prepare()}} 

If the statement has not previously been prepared with the DB API, it will be implicitly prepared by this method call. This means that this call will cause a connection to be dedicated from a \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_datasource_pool}{Datasource\+Pool}} object or the transaction lock to be grabbed with a \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_datasource}{Datasource}} object, depending on the argument to Abstract\+SQLStatement\+::constructor().

Arguments to buffer specifications must be given in the same order as declared in the string given to the \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_abstract_s_q_l_statement_a480f30622fff523ee188297b1eebfa79}{Abstract\+SQLStatement\+::prepare()}} method. Only placeholder buffer specifications will be processed; value buffer specifications will be skipped by this method.

Any buffer specifications previously defined will be released when this call is made.

\begin{DoxyNote}{Note}
You can also bind buffer specifications directly when calling \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_abstract_s_q_l_statement_a1fd3fd0ce29a4eb110dd6ff416195bda}{Abstract\+SQLStatement\+::exec()}} or \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_abstract_s_q_l_statement_aaf3f423da01bbe18b95eaf0cb53053f3}{Abstract\+SQLStatement\+::exec\+Args()}} as a shortcut as well, in which case it\textquotesingle{}s not necessary to make an extra call to this method.~\newline
~\newline
 Not all DBI drivers require binding placeholders specification.
\end{DoxyNote}

\begin{DoxyParams}{Parameters}
{\em vargs} & Arguments to placeholder specifications (if required by the underlying DBI driver)\\
\hline
\end{DoxyParams}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}{0}
\DoxyCodeLine{stmt.prepare(\textcolor{stringliteral}{"{}begin select sysdate into :sd from dual"{}}, Type::Date); end;}
\DoxyCodeLine{list<auto> l = list(Type::Date);}
\DoxyCodeLine{stmt.bindPlaceholdersArgs(l);}
\DoxyCodeLine{date d = stmt.getOutput().sd;}

\end{DoxyCode}

\end{DoxyParagraph}

\begin{DoxyExceptions}{Exceptions}
{\em SQLSTATEMENT-\/\+ERROR} & No SQL has been set with \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_abstract_s_q_l_statement_a480f30622fff523ee188297b1eebfa79}{Abstract\+SQLStatement\+::prepare()}}\\
\hline
\end{DoxyExceptions}
\begin{DoxyNote}{Note}
Exceptions could be thrown by the DBI driver when the statement is prepared or when attempting to bind the given arguments to buffer specifications; see the relevant DBI driver docs for more information
\end{DoxyNote}
\begin{DoxySeeAlso}{See also}
\mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_abstract_s_q_l_statement_a53fbcc157b43c9f733e738f033c5b133}{Abstract\+SQLStatement\+::bind()}}, \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_abstract_s_q_l_statement_aecef7bdce44fb28daf3ffda44bd395b6}{Abstract\+SQLStatement\+::bind\+Args()}}, \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_abstract_s_q_l_statement_a0311c65d5483cd9cbaf48dc59f437895}{Abstract\+SQLStatement\+::bind\+Placeholders()}}, \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_abstract_s_q_l_statement_addf98ea5bdf907ae646a7f2f8e1607c0}{Abstract\+SQLStatement\+::bind\+Values()}}, and \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_abstract_s_q_l_statement_ae80b0921b26b6455b85ae727e57b1fa0}{Abstract\+SQLStatement\+::bind\+Values\+Args()}} 
\end{DoxySeeAlso}


Implemented in \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_s_q_l_statement_abcf1db95fb3e85e4677f141d9176b711}{Qore\+::\+SQL\+::\+SQLStatement}}.

\mbox{\Hypertarget{class_qore_1_1_s_q_l_1_1_abstract_s_q_l_statement_addf98ea5bdf907ae646a7f2f8e1607c0}\label{class_qore_1_1_s_q_l_1_1_abstract_s_q_l_statement_addf98ea5bdf907ae646a7f2f8e1607c0}} 
\index{Qore::SQL::AbstractSQLStatement@{Qore::SQL::AbstractSQLStatement}!bindValues@{bindValues}}
\index{bindValues@{bindValues}!Qore::SQL::AbstractSQLStatement@{Qore::SQL::AbstractSQLStatement}}
\doxysubsubsection{\texorpdfstring{bindValues()}{bindValues()}}
{\footnotesize\ttfamily abstract nothing Qore\+::\+SQL\+::\+Abstract\+SQLStatement\+::bind\+Values (\begin{DoxyParamCaption}\item[{}]{... }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [pure virtual]}}



Binds values to value buffer specifications to buffers defined in \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_abstract_s_q_l_statement_a480f30622fff523ee188297b1eebfa79}{Abstract\+SQLStatement\+::prepare()}} 

If the statement has not previously been prepared with the DB API, it will be implicitly prepared by this method call. This means that this call will cause a connection to be dedicated from a \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_datasource_pool}{Datasource\+Pool}} object or the transaction lock to be grabbed with a \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_datasource}{Datasource}} object, depending on the argument to Abstract\+SQLStatement\+::constructor().

Arguments to buffer specifications must be given in the same order as declared in the string given to the \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_abstract_s_q_l_statement_a480f30622fff523ee188297b1eebfa79}{Abstract\+SQLStatement\+::prepare()}} method.

Any values previously bound will be released when this call is made.

\begin{DoxyNote}{Note}
You can also bind directly when calling \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_abstract_s_q_l_statement_a1fd3fd0ce29a4eb110dd6ff416195bda}{Abstract\+SQLStatement\+::exec()}} or \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_abstract_s_q_l_statement_aaf3f423da01bbe18b95eaf0cb53053f3}{Abstract\+SQLStatement\+::exec\+Args()}} as a shortcut as well, in which case it\textquotesingle{}s not necessary to make an extra call to this method.
\end{DoxyNote}

\begin{DoxyParams}{Parameters}
{\em ...} & Arguments to bind by value arguments\\
\hline
\end{DoxyParams}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}{0}
\DoxyCodeLine{stmt.prepare(\textcolor{stringliteral}{"{}insert into table (id, name) values (\%v, \%v)"{}});}
\DoxyCodeLine{foreach hash<auto> h \textcolor{keywordflow}{in} (l) \{}
\DoxyCodeLine{    stmt.bindValues(h.id, h.name);}
\DoxyCodeLine{    stmt.exec();}
\DoxyCodeLine{\}}

\end{DoxyCode}

\end{DoxyParagraph}

\begin{DoxyExceptions}{Exceptions}
{\em SQLSTATEMENT-\/\+ERROR} & No SQL has been set with \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_abstract_s_q_l_statement_a480f30622fff523ee188297b1eebfa79}{Abstract\+SQLStatement\+::prepare()}}\\
\hline
\end{DoxyExceptions}
\begin{DoxyNote}{Note}
Exceptions could be thrown by the DBI driver when the statement is prepared or when attempting to bind the given arguments to buffer specifications; see the relevant DBI driver docs for more information
\end{DoxyNote}
\begin{DoxySeeAlso}{See also}
\mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_abstract_s_q_l_statement_a53fbcc157b43c9f733e738f033c5b133}{Abstract\+SQLStatement\+::bind()}}, \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_abstract_s_q_l_statement_aecef7bdce44fb28daf3ffda44bd395b6}{Abstract\+SQLStatement\+::bind\+Args()}}, \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_abstract_s_q_l_statement_a0311c65d5483cd9cbaf48dc59f437895}{Abstract\+SQLStatement\+::bind\+Placeholders()}}, \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_abstract_s_q_l_statement_a515142e47a51687427a8e6715bc35a70}{Abstract\+SQLStatement\+::bind\+Placeholders\+Args()}}, and \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_abstract_s_q_l_statement_ae80b0921b26b6455b85ae727e57b1fa0}{Abstract\+SQLStatement\+::bind\+Values\+Args()}}. 
\end{DoxySeeAlso}


Implemented in \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_s_q_l_statement_ab831457973f8279ce9783039cd5a720c}{Qore\+::\+SQL\+::\+SQLStatement}}.

\mbox{\Hypertarget{class_qore_1_1_s_q_l_1_1_abstract_s_q_l_statement_ae80b0921b26b6455b85ae727e57b1fa0}\label{class_qore_1_1_s_q_l_1_1_abstract_s_q_l_statement_ae80b0921b26b6455b85ae727e57b1fa0}} 
\index{Qore::SQL::AbstractSQLStatement@{Qore::SQL::AbstractSQLStatement}!bindValuesArgs@{bindValuesArgs}}
\index{bindValuesArgs@{bindValuesArgs}!Qore::SQL::AbstractSQLStatement@{Qore::SQL::AbstractSQLStatement}}
\doxysubsubsection{\texorpdfstring{bindValuesArgs()}{bindValuesArgs()}}
{\footnotesize\ttfamily abstract nothing Qore\+::\+SQL\+::\+Abstract\+SQLStatement\+::bind\+Values\+Args (\begin{DoxyParamCaption}\item[{softlist$<$ auto $>$}]{vargs }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [pure virtual]}}



Binds values to value buffer specifications given as a list in the single argument to the method to value buffers defined in \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_abstract_s_q_l_statement_a480f30622fff523ee188297b1eebfa79}{Abstract\+SQLStatement\+::prepare()}} 

If the statement has not previously been prepared with the DB API, it will be implicitly prepared by this method call. This means that this call will cause a connection to be dedicated from a \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_datasource_pool}{Datasource\+Pool}} object or the transaction lock to be grabbed with a \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_datasource}{Datasource}} object, depending on the argument to Abstract\+SQLStatement\+::constructor().

Arguments to buffer specifications must be given in the same order as declared in the string given to the \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_abstract_s_q_l_statement_a480f30622fff523ee188297b1eebfa79}{Abstract\+SQLStatement\+::prepare()}} method.

Any values previously bound will be released when this call is made.

\begin{DoxyNote}{Note}
You can also bind directly when calling \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_abstract_s_q_l_statement_a1fd3fd0ce29a4eb110dd6ff416195bda}{Abstract\+SQLStatement\+::exec()}} or \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_abstract_s_q_l_statement_aaf3f423da01bbe18b95eaf0cb53053f3}{Abstract\+SQLStatement\+::exec\+Args()}} as a shortcut as well, in which case it\textquotesingle{}s not necessary to make an extra call to this method.
\end{DoxyNote}

\begin{DoxyParams}{Parameters}
{\em vargs} & Arguments to bind by value arguments\\
\hline
\end{DoxyParams}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}{0}
\DoxyCodeLine{stmt.prepare(\textcolor{stringliteral}{"{}insert into table (id, name) values (\%v, \%v)"{}});}
\DoxyCodeLine{foreach hash<auto> h \textcolor{keywordflow}{in} (l) \{}
\DoxyCodeLine{    list<auto> args = (h.id, h.name);}
\DoxyCodeLine{    stmt.bindValuesArgs(args);}
\DoxyCodeLine{    stmt.exec();}
\DoxyCodeLine{\}}

\end{DoxyCode}

\end{DoxyParagraph}

\begin{DoxyExceptions}{Exceptions}
{\em SQLSTATEMENT-\/\+ERROR} & No SQL has been set with \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_abstract_s_q_l_statement_a480f30622fff523ee188297b1eebfa79}{Abstract\+SQLStatement\+::prepare()}}\\
\hline
\end{DoxyExceptions}
\begin{DoxyNote}{Note}
Exceptions could be thrown by the DBI driver when the statement is prepared or when attempting to bind the given arguments to buffer specifications; see the relevant DBI driver docs for more information 
\end{DoxyNote}


Implemented in \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_s_q_l_statement_a01789f9ed02c8fc9e0b0493cf1823cb5}{Qore\+::\+SQL\+::\+SQLStatement}}.

\mbox{\Hypertarget{class_qore_1_1_s_q_l_1_1_abstract_s_q_l_statement_a3be914ba53e691d4ee4655973de3718b}\label{class_qore_1_1_s_q_l_1_1_abstract_s_q_l_statement_a3be914ba53e691d4ee4655973de3718b}} 
\index{Qore::SQL::AbstractSQLStatement@{Qore::SQL::AbstractSQLStatement}!close@{close}}
\index{close@{close}!Qore::SQL::AbstractSQLStatement@{Qore::SQL::AbstractSQLStatement}}
\doxysubsubsection{\texorpdfstring{close()}{close()}}
{\footnotesize\ttfamily abstract nothing Qore\+::\+SQL\+::\+Abstract\+SQLStatement\+::close (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [pure virtual]}}



Closes the statement if it is open, however this method does not release the connection or transaction lock. 

\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}{0}
\DoxyCodeLine{stmt.close();}

\end{DoxyCode}
 
\end{DoxyParagraph}


Implemented in \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_s_q_l_statement_a568ebcbb44ae14b127487524169b0d78}{Qore\+::\+SQL\+::\+SQLStatement}}.

\mbox{\Hypertarget{class_qore_1_1_s_q_l_1_1_abstract_s_q_l_statement_a721847f8231a8e1539542dbe5bca606d}\label{class_qore_1_1_s_q_l_1_1_abstract_s_q_l_statement_a721847f8231a8e1539542dbe5bca606d}} 
\index{Qore::SQL::AbstractSQLStatement@{Qore::SQL::AbstractSQLStatement}!commit@{commit}}
\index{commit@{commit}!Qore::SQL::AbstractSQLStatement@{Qore::SQL::AbstractSQLStatement}}
\doxysubsubsection{\texorpdfstring{commit()}{commit()}}
{\footnotesize\ttfamily abstract nothing Qore\+::\+SQL\+::\+Abstract\+SQLStatement\+::commit (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [pure virtual]}}



Commits the transaction, releases the connection or the transaction lock according to the object used in the Abstract\+SQLStatement\+::constructor(), and closes the \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_s_q_l_statement}{SQLStatement}}. 

\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}{0}
\DoxyCodeLine{stmt.commit();}

\end{DoxyCode}

\end{DoxyParagraph}
\begin{DoxyNote}{Note}
For possible exceptions; see DBI driver docs for the \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_abstract_s_q_l_statement_a721847f8231a8e1539542dbe5bca606d}{commit()}} method 
\end{DoxyNote}


Implemented in \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_s_q_l_statement_a4a5a12d0ca11cea1862152de47f0c812}{Qore\+::\+SQL\+::\+SQLStatement}}.

\mbox{\Hypertarget{class_qore_1_1_s_q_l_1_1_abstract_s_q_l_statement_afb9a48701323d1c620f4bfcf40e4ba78}\label{class_qore_1_1_s_q_l_1_1_abstract_s_q_l_statement_afb9a48701323d1c620f4bfcf40e4ba78}} 
\index{Qore::SQL::AbstractSQLStatement@{Qore::SQL::AbstractSQLStatement}!currentThreadInTransaction@{currentThreadInTransaction}}
\index{currentThreadInTransaction@{currentThreadInTransaction}!Qore::SQL::AbstractSQLStatement@{Qore::SQL::AbstractSQLStatement}}
\doxysubsubsection{\texorpdfstring{currentThreadInTransaction()}{currentThreadInTransaction()}}
{\footnotesize\ttfamily abstract bool Qore\+::\+SQL\+::\+Abstract\+SQLStatement\+::current\+Thread\+In\+Transaction (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [pure virtual]}}



Returns \mbox{\hyperlink{basic_data_types_True}{True}} if the current thread is in a transaction (i.\+e. holds the transaction lock), \mbox{\hyperlink{basic_data_types_False}{False}} if not. 

\begin{DoxyReturn}{Returns}
\mbox{\hyperlink{basic_data_types_True}{True}} if the current thread is in a transaction (i.\+e. holds the transaction lock), \mbox{\hyperlink{basic_data_types_False}{False}} if not
\end{DoxyReturn}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}{0}
\DoxyCodeLine{bool b = stmt.currentThreadInTransaction();}

\end{DoxyCode}
 
\end{DoxyParagraph}


Implemented in \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_s_q_l_statement_a50d360812380f793b0b0ab7f0b181792}{Qore\+::\+SQL\+::\+SQLStatement}}.

\mbox{\Hypertarget{class_qore_1_1_s_q_l_1_1_abstract_s_q_l_statement_a7f767fcdc63e67b201acfa73cc3c5b82}\label{class_qore_1_1_s_q_l_1_1_abstract_s_q_l_statement_a7f767fcdc63e67b201acfa73cc3c5b82}} 
\index{Qore::SQL::AbstractSQLStatement@{Qore::SQL::AbstractSQLStatement}!define@{define}}
\index{define@{define}!Qore::SQL::AbstractSQLStatement@{Qore::SQL::AbstractSQLStatement}}
\doxysubsubsection{\texorpdfstring{define()}{define()}}
{\footnotesize\ttfamily abstract nothing Qore\+::\+SQL\+::\+Abstract\+SQLStatement\+::define (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [pure virtual]}}



Performs an explicit define operation on the \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_s_q_l_statement}{SQLStatement}}. 

It is not encessary to call this method manually; define operations are implicitly executed when needed when retrieving values from a select statement

\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}{0}
\DoxyCodeLine{\{}
\DoxyCodeLine{    SQLStatement stmt(ds);}
\DoxyCodeLine{    \textcolor{comment}{\# release transaction lock on exit}}
\DoxyCodeLine{    on\_exit stmt.commit();}
\DoxyCodeLine{    stmt.prepare(\textcolor{stringliteral}{"{}select * from table"{}});}
\DoxyCodeLine{    stmt.exec();}
\DoxyCodeLine{    stmt.define();}
\DoxyCodeLine{    \textcolor{comment}{\# note that the AbstractSQLStatement::next() would implicitly execute exec() and define()}}
\DoxyCodeLine{    \textcolor{keywordflow}{while} (stmt.next()) \{}
\DoxyCodeLine{        hash<auto> row = stmt.fetchRow();}
\DoxyCodeLine{        do\_something(row);}
\DoxyCodeLine{    \}}
\DoxyCodeLine{\}}

\end{DoxyCode}
 
\end{DoxyParagraph}


Implemented in \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_s_q_l_statement_a22375c4a7755215cc53accc68b626ec7}{Qore\+::\+SQL\+::\+SQLStatement}}.

\mbox{\Hypertarget{class_qore_1_1_s_q_l_1_1_abstract_s_q_l_statement_a37f73061df67a487ec8688dbc91e3413}\label{class_qore_1_1_s_q_l_1_1_abstract_s_q_l_statement_a37f73061df67a487ec8688dbc91e3413}} 
\index{Qore::SQL::AbstractSQLStatement@{Qore::SQL::AbstractSQLStatement}!describe@{describe}}
\index{describe@{describe}!Qore::SQL::AbstractSQLStatement@{Qore::SQL::AbstractSQLStatement}}
\doxysubsubsection{\texorpdfstring{describe()}{describe()}}
{\footnotesize\ttfamily abstract \mbox{\hyperlink{group__type__conversion__functions_ga24ee71727f0785d3b826833ed6f5e2ee}{hash}}$<$ auto $>$ Qore\+::\+SQL\+::\+Abstract\+SQLStatement\+::describe (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [pure virtual]}}



Describes columns in the statement result. 

\begin{DoxyReturn}{Returns}
a hash with ({\itshape column\+\_\+name}\+: {\itshape description\+\_\+hash}) format, where each {\itshape description\+\_\+hash} has the following keys\+:
\begin{DoxyItemize}
\item {\ttfamily \char`\"{}name\char`\"{}}\+: (string) the column name
\item {\ttfamily \char`\"{}type\char`\"{}}\+: (integer) the column type code (as returned by \mbox{\hyperlink{class_qore_1_1zzz8valuezzz9_a5e7d381ab49abebd0d0f045708482512}{Qore\+::zzz8valuezzz9\+::type\+Code()}})
\item {\ttfamily \char`\"{}maxsize\char`\"{}}\+: (integer) the maximum size of the column
\item {\ttfamily \char`\"{}native\+\_\+type\char`\"{}}\+: (string) the database-\/specific name of the type
\item {\ttfamily \char`\"{}internal\+\_\+id\char`\"{}}\+: (integer) the database-\/specific type code of the type 
\end{DoxyItemize}
\end{DoxyReturn}


Implemented in \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_s_q_l_statement_a411ebe1b36f43e8c749f46fac1a95ea6}{Qore\+::\+SQL\+::\+SQLStatement}}.

\mbox{\Hypertarget{class_qore_1_1_s_q_l_1_1_abstract_s_q_l_statement_a1fd3fd0ce29a4eb110dd6ff416195bda}\label{class_qore_1_1_s_q_l_1_1_abstract_s_q_l_statement_a1fd3fd0ce29a4eb110dd6ff416195bda}} 
\index{Qore::SQL::AbstractSQLStatement@{Qore::SQL::AbstractSQLStatement}!exec@{exec}}
\index{exec@{exec}!Qore::SQL::AbstractSQLStatement@{Qore::SQL::AbstractSQLStatement}}
\doxysubsubsection{\texorpdfstring{exec()}{exec()}}
{\footnotesize\ttfamily abstract nothing Qore\+::\+SQL\+::\+Abstract\+SQLStatement\+::exec (\begin{DoxyParamCaption}\item[{}]{... }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [pure virtual]}}



Executes the bound statement with any bound buffers, also optionally allows binding placeholder buffer specifications and values to buffers defined in \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_abstract_s_q_l_statement_a480f30622fff523ee188297b1eebfa79}{Abstract\+SQLStatement\+::prepare()}} before executing the statement. 

If the statement has not previously been prepared with the DB API, it will be implicitly prepared by this method call. This means that this call will cause a connection to be dedicated from a \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_datasource_pool}{Datasource\+Pool}} object or the transaction lock to be grabbed with a \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_datasource}{Datasource}} object, depending on the argument to Abstract\+SQLStatement\+::constructor().

Optional arguments to buffer specifications must be given in the same order as declared in the string given to the \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_abstract_s_q_l_statement_a480f30622fff523ee188297b1eebfa79}{Abstract\+SQLStatement\+::prepare()}} method.

If bind arguments are provided, any arguments previously bound will be released when this call is made.

After calling this method to execute the statement, to retrieve information about the call or output values bound in the call, call \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_abstract_s_q_l_statement_af32268f269fc8e29cb4966ec70d40b26}{Abstract\+SQLStatement\+::affected\+Rows()}}, \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_abstract_s_q_l_statement_a105c1c02eb3d3801444dc316d1924005}{Abstract\+SQLStatement\+::get\+Output()}}, or \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_abstract_s_q_l_statement_a46b3bbb2ed34884cce469fa4c5b65900}{Abstract\+SQLStatement\+::get\+Output\+Rows()}} as needed.

To retrieve rows from a select statement call either \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_abstract_s_q_l_statement_a45f7bd62a339149daa3f859012eb626f}{Abstract\+SQLStatement\+::next()}} and \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_abstract_s_q_l_statement_a80ff8fb63f5cb85f4df46cf4a6c76a7e}{Abstract\+SQLStatement\+::fetch\+Row()}}, or \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_abstract_s_q_l_statement_aae949362a3f374fd889a002d663430b3}{Abstract\+SQLStatement\+::fetch\+Rows()}} or \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_abstract_s_q_l_statement_ac66790469493b564798f50f03bf2acc9}{Abstract\+SQLStatement\+::fetch\+Columns()}} as needed.


\begin{DoxyParams}{Parameters}
{\em ...} & Optional arguments to placeholder specifications (if required by the underlying DBI driver) and bind by value arguments can be given in the call to the method; if present, arguments are bound before the statement is executed\\
\hline
\end{DoxyParams}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}{0}
\DoxyCodeLine{stmt.prepare(\textcolor{stringliteral}{"{}insert into table (id, name) values (\%v, \%v)"{}});}
\DoxyCodeLine{foreach hash<auto> h \textcolor{keywordflow}{in} (l) \{}
\DoxyCodeLine{    stmt.exec(h.id, h.name);}
\DoxyCodeLine{\}}

\end{DoxyCode}

\end{DoxyParagraph}

\begin{DoxyExceptions}{Exceptions}
{\em SQLSTATEMENT-\/\+ERROR} & No SQL has been set with \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_abstract_s_q_l_statement_a480f30622fff523ee188297b1eebfa79}{Abstract\+SQLStatement\+::prepare()}}; the \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_s_q_l_statement}{SQLStatement}} uses a \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_datasource_pool}{Datasource\+Pool}} an the statement was prepared on another connection\\
\hline
\end{DoxyExceptions}
\begin{DoxyNote}{Note}
Exceptions could be thrown by the DBI driver when the statement is prepared or when attempting to bind the given arguments to buffer specifications or when the statement is executed; see the relevant DBI driver docs for more information
\end{DoxyNote}
\begin{DoxySeeAlso}{See also}
\mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_abstract_s_q_l_statement_aaf3f423da01bbe18b95eaf0cb53053f3}{Abstract\+SQLStatement\+::exec\+Args()}} 
\end{DoxySeeAlso}


Implemented in \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_s_q_l_statement_af1633d031c7480fed7de638b21f9a087}{Qore\+::\+SQL\+::\+SQLStatement}}.

\mbox{\Hypertarget{class_qore_1_1_s_q_l_1_1_abstract_s_q_l_statement_aaf3f423da01bbe18b95eaf0cb53053f3}\label{class_qore_1_1_s_q_l_1_1_abstract_s_q_l_statement_aaf3f423da01bbe18b95eaf0cb53053f3}} 
\index{Qore::SQL::AbstractSQLStatement@{Qore::SQL::AbstractSQLStatement}!execArgs@{execArgs}}
\index{execArgs@{execArgs}!Qore::SQL::AbstractSQLStatement@{Qore::SQL::AbstractSQLStatement}}
\doxysubsubsection{\texorpdfstring{execArgs()}{execArgs()}}
{\footnotesize\ttfamily abstract nothing Qore\+::\+SQL\+::\+Abstract\+SQLStatement\+::exec\+Args (\begin{DoxyParamCaption}\item[{softlist$<$ auto $>$}]{vargs }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [pure virtual]}}



Executes the bound statement with any bound buffers, also optionally allows binding placeholder buffer specifications and values given as a list in the single argument to the method to buffers defined in \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_abstract_s_q_l_statement_a480f30622fff523ee188297b1eebfa79}{Abstract\+SQLStatement\+::prepare()}} 

If the statement has not previously been prepared with the DB API, it will be implicitly prepared by this method call. This means that this call will cause a connection to be dedicated from a \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_datasource_pool}{Datasource\+Pool}} object or the transaction lock to be grabbed with a \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_datasource}{Datasource}} object, depending on the argument to Abstract\+SQLStatement\+::constructor().

Optional arguments to buffer specifications must be given in the same order as declared in the string given to the \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_abstract_s_q_l_statement_a480f30622fff523ee188297b1eebfa79}{Abstract\+SQLStatement\+::prepare()}} method.

If bind arguments are provided, any arguments previously bound will be released when this call is made.

After calling this method to execute the statement, to retrieve information about the call or output values bound in the call, call \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_abstract_s_q_l_statement_af32268f269fc8e29cb4966ec70d40b26}{Abstract\+SQLStatement\+::affected\+Rows()}}, \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_abstract_s_q_l_statement_a105c1c02eb3d3801444dc316d1924005}{Abstract\+SQLStatement\+::get\+Output()}}, or \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_abstract_s_q_l_statement_a46b3bbb2ed34884cce469fa4c5b65900}{Abstract\+SQLStatement\+::get\+Output\+Rows()}} as needed.

To retrieve rows from a select statement call either \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_abstract_s_q_l_statement_a45f7bd62a339149daa3f859012eb626f}{Abstract\+SQLStatement\+::next()}} and \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_abstract_s_q_l_statement_a80ff8fb63f5cb85f4df46cf4a6c76a7e}{Abstract\+SQLStatement\+::fetch\+Row()}}, or \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_abstract_s_q_l_statement_aae949362a3f374fd889a002d663430b3}{Abstract\+SQLStatement\+::fetch\+Rows()}} or \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_abstract_s_q_l_statement_ac66790469493b564798f50f03bf2acc9}{Abstract\+SQLStatement\+::fetch\+Columns()}} as needed.


\begin{DoxyParams}{Parameters}
{\em vargs} & Optional arguments to placeholder specifications (if required by the underlying DBI driver) and bind by value arguments can be given in the call to the method; if present, arguments are bound before the statement is executed\\
\hline
\end{DoxyParams}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}{0}
\DoxyCodeLine{stmt.prepare(\textcolor{stringliteral}{"{}insert into table (id, name) values (\%v, \%v)"{}});}
\DoxyCodeLine{foreach hash<auto> h \textcolor{keywordflow}{in} (l) \{}
\DoxyCodeLine{    list<auto> args = (h.id, h.name);}
\DoxyCodeLine{    stmt.execArgs(args);}
\DoxyCodeLine{\}}

\end{DoxyCode}

\end{DoxyParagraph}

\begin{DoxyExceptions}{Exceptions}
{\em SQLSTATEMENT-\/\+ERROR} & No SQL has been set with \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_abstract_s_q_l_statement_a480f30622fff523ee188297b1eebfa79}{Abstract\+SQLStatement\+::prepare()}} or \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_abstract_s_q_l_statement_a0f5d70f9678cd823fb1eb7aa99052fdd}{Abstract\+SQLStatement\+::prepare\+Raw()}}; the \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_s_q_l_statement}{SQLStatement}} uses a \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_datasource_pool}{Datasource\+Pool}} an the statement was prepared on another connection\\
\hline
\end{DoxyExceptions}
\begin{DoxyNote}{Note}
Exceptions could be thrown by the DBI driver when the statement is prepared or when attempting to bind the given arguments to buffer specifications or when the statement is executed; see the relevant DBI driver docs for more information
\end{DoxyNote}
\begin{DoxySeeAlso}{See also}
\mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_abstract_s_q_l_statement_a1fd3fd0ce29a4eb110dd6ff416195bda}{Abstract\+SQLStatement\+::exec()}} 
\end{DoxySeeAlso}


Implemented in \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_s_q_l_statement_a58ffbb1fb12036db5027cf70918733b3}{Qore\+::\+SQL\+::\+SQLStatement}}.

\mbox{\Hypertarget{class_qore_1_1_s_q_l_1_1_abstract_s_q_l_statement_ac66790469493b564798f50f03bf2acc9}\label{class_qore_1_1_s_q_l_1_1_abstract_s_q_l_statement_ac66790469493b564798f50f03bf2acc9}} 
\index{Qore::SQL::AbstractSQLStatement@{Qore::SQL::AbstractSQLStatement}!fetchColumns@{fetchColumns}}
\index{fetchColumns@{fetchColumns}!Qore::SQL::AbstractSQLStatement@{Qore::SQL::AbstractSQLStatement}}
\doxysubsubsection{\texorpdfstring{fetchColumns()}{fetchColumns()}}
{\footnotesize\ttfamily abstract \mbox{\hyperlink{group__type__conversion__functions_ga24ee71727f0785d3b826833ed6f5e2ee}{hash}}$<$ auto $>$ Qore\+::\+SQL\+::\+Abstract\+SQLStatement\+::fetch\+Columns (\begin{DoxyParamCaption}\item[{softint}]{rows = {\ttfamily -\/1} }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [pure virtual]}}



Retrieves a block of rows as a hash of lists with the maximum number of rows determined by the argument passed; automatically advances the row pointer; with this call it is not necessary to call \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_abstract_s_q_l_statement_a45f7bd62a339149daa3f859012eb626f}{Abstract\+SQLStatement\+::next()}}. 

If the argument passed is omitted or less than or equal to zero, then all available rows from the current row position are retrieved, also if fewer rows are available than requested then only the rows available are retrieved.


\begin{DoxyParams}{Parameters}
{\em rows} & The maximum number of rows to retrieve, if this argument is omitted, negative, or equal to zero, then all available rows from the current row position are retrieved\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
a hash (giving column names) of lists (giving row values for each column) of data returned; each list will have at most {\itshape rows} elements (unless {\itshape rows} is negative, in which case all available rows are returned). If the total number of rows available is less than {\itshape rows} (if {\itshape rows} is positive), then the last data returned by this method may return short lists. If no more rows are available, then an empty hash is returned
\end{DoxyReturn}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}{0}
\DoxyCodeLine{hash<auto> h = stmt.fetchColumns(-\/1);}

\end{DoxyCode}

\end{DoxyParagraph}

\begin{DoxyExceptions}{Exceptions}
{\em SQLSTATEMENT-\/\+ERROR} & No SQL has been set with \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_abstract_s_q_l_statement_a480f30622fff523ee188297b1eebfa79}{Abstract\+SQLStatement\+::prepare()}} or \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_abstract_s_q_l_statement_a0f5d70f9678cd823fb1eb7aa99052fdd}{Abstract\+SQLStatement\+::prepare\+Raw()}}\\
\hline
\end{DoxyExceptions}
\begin{DoxyNote}{Note}

\begin{DoxyItemize}
\item There is no need to call \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_abstract_s_q_l_statement_a45f7bd62a339149daa3f859012eb626f}{Abstract\+SQLStatement\+::next()}} when calling this method; the method automatically iterates through the given number of rows
\item Exceptions could be thrown by the DBI driver when the statement is prepared or when attempting to bind the given arguments to buffer specifications or when the statement is executed or when row values are retrieved; see the relevant DBI driver docs for more information 
\end{DoxyItemize}
\end{DoxyNote}


Implemented in \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_s_q_l_statement_a7ec66c1e186aac00034b27015adf8c1c}{Qore\+::\+SQL\+::\+SQLStatement}}.

\mbox{\Hypertarget{class_qore_1_1_s_q_l_1_1_abstract_s_q_l_statement_a80ff8fb63f5cb85f4df46cf4a6c76a7e}\label{class_qore_1_1_s_q_l_1_1_abstract_s_q_l_statement_a80ff8fb63f5cb85f4df46cf4a6c76a7e}} 
\index{Qore::SQL::AbstractSQLStatement@{Qore::SQL::AbstractSQLStatement}!fetchRow@{fetchRow}}
\index{fetchRow@{fetchRow}!Qore::SQL::AbstractSQLStatement@{Qore::SQL::AbstractSQLStatement}}
\doxysubsubsection{\texorpdfstring{fetchRow()}{fetchRow()}}
{\footnotesize\ttfamily abstract \+\_\+\+\_\+7\+\_\+ \mbox{\hyperlink{group__type__conversion__functions_ga24ee71727f0785d3b826833ed6f5e2ee}{hash}}$<$ auto $>$ Qore\+::\+SQL\+::\+Abstract\+SQLStatement\+::fetch\+Row (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [pure virtual]}}



Retrieves the current row as a hash where the keys are the column names and the values are the column values. 

Use with \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_abstract_s_q_l_statement_a45f7bd62a339149daa3f859012eb626f}{Abstract\+SQLStatement\+::next()}} to iterate through the results of a select statement one row at a time

\begin{DoxyReturn}{Returns}
the current row as a hash where the keys are the column names and the values are the column values
\end{DoxyReturn}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}{0}
\DoxyCodeLine{\textcolor{keywordflow}{while} (stmt.next()) \{}
\DoxyCodeLine{    hash<auto> h = stmt.fetchRow();}
\DoxyCodeLine{\}}

\end{DoxyCode}

\end{DoxyParagraph}

\begin{DoxyExceptions}{Exceptions}
{\em SQLSTATEMENT-\/\+ERROR} & No SQL has been set with \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_abstract_s_q_l_statement_a480f30622fff523ee188297b1eebfa79}{Abstract\+SQLStatement\+::prepare()}} or \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_abstract_s_q_l_statement_a0f5d70f9678cd823fb1eb7aa99052fdd}{Abstract\+SQLStatement\+::prepare\+Raw()}}\\
\hline
\end{DoxyExceptions}
\begin{DoxyNote}{Note}
Exceptions could be thrown by the DBI driver when the statement is prepared or when attempting to bind the given arguments to buffer specifications or when the statement is executed or when row values are retrieved; see the relevant DBI driver docs for more information 
\end{DoxyNote}


Implemented in \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_s_q_l_statement_ae866ed537d54a90ce846330f211f4dfb}{Qore\+::\+SQL\+::\+SQLStatement}}.

\mbox{\Hypertarget{class_qore_1_1_s_q_l_1_1_abstract_s_q_l_statement_aae949362a3f374fd889a002d663430b3}\label{class_qore_1_1_s_q_l_1_1_abstract_s_q_l_statement_aae949362a3f374fd889a002d663430b3}} 
\index{Qore::SQL::AbstractSQLStatement@{Qore::SQL::AbstractSQLStatement}!fetchRows@{fetchRows}}
\index{fetchRows@{fetchRows}!Qore::SQL::AbstractSQLStatement@{Qore::SQL::AbstractSQLStatement}}
\doxysubsubsection{\texorpdfstring{fetchRows()}{fetchRows()}}
{\footnotesize\ttfamily abstract \mbox{\hyperlink{group__type__conversion__functions_ga9a401e5112c58f63c05e7ee1e15968ef}{list}}$<$ auto $>$ Qore\+::\+SQL\+::\+Abstract\+SQLStatement\+::fetch\+Rows (\begin{DoxyParamCaption}\item[{softint}]{rows = {\ttfamily -\/1} }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [pure virtual]}}



Retrieves a block of rows as a list of hashes with the maximum number of rows determined by the argument passed; automatically advances the row pointer; with this call it is not necessary to call \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_abstract_s_q_l_statement_a45f7bd62a339149daa3f859012eb626f}{Abstract\+SQLStatement\+::next()}} 

If the argument passed is omitted or less than or equal to zero, then all available rows from the current row position are retrieved, also if fewer rows are available than requested then only the rows available are retrieved.

If no more rows are available then an empty list is returned.


\begin{DoxyParams}{Parameters}
{\em rows} & The maximum number of rows to retrieve, if this argument is omitted, negative, or equal to zero, then all available rows from the current row position are retrieved\\
\hline
\end{DoxyParams}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}{0}
\DoxyCodeLine{list<auto> l = stmt.fetchRows(-\/1);}

\end{DoxyCode}

\end{DoxyParagraph}

\begin{DoxyExceptions}{Exceptions}
{\em SQLSTATEMENT-\/\+ERROR} & No SQL has been set with \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_abstract_s_q_l_statement_a480f30622fff523ee188297b1eebfa79}{Abstract\+SQLStatement\+::prepare()}} or \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_abstract_s_q_l_statement_a0f5d70f9678cd823fb1eb7aa99052fdd}{Abstract\+SQLStatement\+::prepare\+Raw()}}\\
\hline
\end{DoxyExceptions}
\begin{DoxyNote}{Note}

\begin{DoxyItemize}
\item There is no need to call \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_abstract_s_q_l_statement_a45f7bd62a339149daa3f859012eb626f}{Abstract\+SQLStatement\+::next()}} when calling this method; the method automatically iterates through the given number of rows
\item Exceptions could be thrown by the DBI driver when the statement is prepared or when attempting to bind the given arguments to buffer specifications or when the statement is executed or when row values are retrieved; see the relevant DBI driver docs for more information 
\end{DoxyItemize}
\end{DoxyNote}


Implemented in \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_s_q_l_statement_a910705bcc2c991c0abd1f82f33697332}{Qore\+::\+SQL\+::\+SQLStatement}}.

\mbox{\Hypertarget{class_qore_1_1_s_q_l_1_1_abstract_s_q_l_statement_a105c1c02eb3d3801444dc316d1924005}\label{class_qore_1_1_s_q_l_1_1_abstract_s_q_l_statement_a105c1c02eb3d3801444dc316d1924005}} 
\index{Qore::SQL::AbstractSQLStatement@{Qore::SQL::AbstractSQLStatement}!getOutput@{getOutput}}
\index{getOutput@{getOutput}!Qore::SQL::AbstractSQLStatement@{Qore::SQL::AbstractSQLStatement}}
\doxysubsubsection{\texorpdfstring{getOutput()}{getOutput()}}
{\footnotesize\ttfamily abstract \mbox{\hyperlink{group__type__conversion__functions_ga24ee71727f0785d3b826833ed6f5e2ee}{hash}}$<$ auto $>$ Qore\+::\+SQL\+::\+Abstract\+SQLStatement\+::get\+Output (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [pure virtual]}}



Retrieves output buffers as a hash; result sets will be returned as hashes of lists. 

\begin{DoxyReturn}{Returns}
Returns a hash of output buffers; result sets will be returned as hashes of lists. Each key in the hash is the same as the name given to the placeholder specification in the call to \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_abstract_s_q_l_statement_a480f30622fff523ee188297b1eebfa79}{Abstract\+SQLStatement\+::prepare()}} or \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_abstract_s_q_l_statement_a0f5d70f9678cd823fb1eb7aa99052fdd}{Abstract\+SQLStatement\+::prepare\+Raw()}}
\end{DoxyReturn}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}{0}
\DoxyCodeLine{hash<auto> h = stmt.getOutput();}

\end{DoxyCode}

\end{DoxyParagraph}

\begin{DoxyExceptions}{Exceptions}
{\em SQLSTATEMENT-\/\+ERROR} & No SQL has been set with \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_abstract_s_q_l_statement_a480f30622fff523ee188297b1eebfa79}{Abstract\+SQLStatement\+::prepare()}} or \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_abstract_s_q_l_statement_a0f5d70f9678cd823fb1eb7aa99052fdd}{Abstract\+SQLStatement\+::prepare\+Raw()}}\\
\hline
\end{DoxyExceptions}
\begin{DoxyNote}{Note}
Exceptions could be thrown by the DBI driver when the statement is prepared or when attempting to bind the given arguments to buffer specifications or when the statement is executed or when output values are retrieved; see the relevant DBI driver docs for more information 
\end{DoxyNote}


Implemented in \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_s_q_l_statement_a18f8fef35598ba07b2376dd42c182c6d}{Qore\+::\+SQL\+::\+SQLStatement}}.

\mbox{\Hypertarget{class_qore_1_1_s_q_l_1_1_abstract_s_q_l_statement_a46b3bbb2ed34884cce469fa4c5b65900}\label{class_qore_1_1_s_q_l_1_1_abstract_s_q_l_statement_a46b3bbb2ed34884cce469fa4c5b65900}} 
\index{Qore::SQL::AbstractSQLStatement@{Qore::SQL::AbstractSQLStatement}!getOutputRows@{getOutputRows}}
\index{getOutputRows@{getOutputRows}!Qore::SQL::AbstractSQLStatement@{Qore::SQL::AbstractSQLStatement}}
\doxysubsubsection{\texorpdfstring{getOutputRows()}{getOutputRows()}}
{\footnotesize\ttfamily abstract \mbox{\hyperlink{group__type__conversion__functions_ga24ee71727f0785d3b826833ed6f5e2ee}{hash}}$<$ auto $>$ Qore\+::\+SQL\+::\+Abstract\+SQLStatement\+::get\+Output\+Rows (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [pure virtual]}}



Retrieves output buffers as a hash; result sets will be returned as lists of hashes. 

\begin{DoxyReturn}{Returns}
Retrieves output buffers as a hash; result sets will be returned as lists of hashes. Each key in the hash is the same as the name given to the placeholder specification in the call to \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_abstract_s_q_l_statement_a480f30622fff523ee188297b1eebfa79}{Abstract\+SQLStatement\+::prepare()}} or \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_abstract_s_q_l_statement_a0f5d70f9678cd823fb1eb7aa99052fdd}{Abstract\+SQLStatement\+::prepare\+Raw()}}
\end{DoxyReturn}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}{0}
\DoxyCodeLine{hash<auto> h = stmt.getOutputRows();}

\end{DoxyCode}

\end{DoxyParagraph}

\begin{DoxyExceptions}{Exceptions}
{\em SQLSTATEMENT-\/\+ERROR} & No SQL has been set with \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_abstract_s_q_l_statement_a480f30622fff523ee188297b1eebfa79}{Abstract\+SQLStatement\+::prepare()}} or \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_abstract_s_q_l_statement_a0f5d70f9678cd823fb1eb7aa99052fdd}{Abstract\+SQLStatement\+::prepare\+Raw()}}\\
\hline
\end{DoxyExceptions}
\begin{DoxyNote}{Note}
Exceptions could be thrown by the DBI driver when the statement is prepared or when attempting to bind the given arguments to buffer specifications or when the statement is executed or when output values are retrieved; see the relevant DBI driver docs for more information 
\end{DoxyNote}


Implemented in \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_s_q_l_statement_aaffb22d306d3b408d5614b58f40b66aa}{Qore\+::\+SQL\+::\+SQLStatement}}.

\mbox{\Hypertarget{class_qore_1_1_s_q_l_1_1_abstract_s_q_l_statement_aa351dd140d5e1a6147a3a34e92614493}\label{class_qore_1_1_s_q_l_1_1_abstract_s_q_l_statement_aa351dd140d5e1a6147a3a34e92614493}} 
\index{Qore::SQL::AbstractSQLStatement@{Qore::SQL::AbstractSQLStatement}!getSQL@{getSQL}}
\index{getSQL@{getSQL}!Qore::SQL::AbstractSQLStatement@{Qore::SQL::AbstractSQLStatement}}
\doxysubsubsection{\texorpdfstring{getSQL()}{getSQL()}}
{\footnotesize\ttfamily abstract \+\_\+\+\_\+7\+\_\+ \mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} Qore\+::\+SQL\+::\+Abstract\+SQLStatement\+::get\+SQL (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [pure virtual]}}



Returns the current \mbox{\hyperlink{namespace_qore_1_1_s_q_l}{SQL}} string set with the call to \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_abstract_s_q_l_statement_a480f30622fff523ee188297b1eebfa79}{Abstract\+SQLStatement\+::prepare()}} or \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_abstract_s_q_l_statement_a0f5d70f9678cd823fb1eb7aa99052fdd}{Abstract\+SQLStatement\+::prepare\+Raw()}} or \mbox{\hyperlink{basic_data_types_nothing}{NOTHING}} if no \mbox{\hyperlink{namespace_qore_1_1_s_q_l}{SQL}} has been set. 

\begin{DoxyReturn}{Returns}
Returns the current \mbox{\hyperlink{namespace_qore_1_1_s_q_l}{SQL}} string set with the call to \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_abstract_s_q_l_statement_a480f30622fff523ee188297b1eebfa79}{Abstract\+SQLStatement\+::prepare()}} or \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_abstract_s_q_l_statement_a0f5d70f9678cd823fb1eb7aa99052fdd}{Abstract\+SQLStatement\+::prepare\+Raw()}} or \mbox{\hyperlink{basic_data_types_nothing}{NOTHING}} if no \mbox{\hyperlink{namespace_qore_1_1_s_q_l}{SQL}} has been set
\end{DoxyReturn}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}{0}
\DoxyCodeLine{*string sql = stmt.getSQL();}

\end{DoxyCode}
 
\end{DoxyParagraph}


Implemented in \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_s_q_l_statement_a61c9cdf7687934dd54faf0c4cb5dd2c6}{Qore\+::\+SQL\+::\+SQLStatement}}.

\mbox{\Hypertarget{class_qore_1_1_s_q_l_1_1_abstract_s_q_l_statement_a97c746cfb641d4e3370c491de36af137}\label{class_qore_1_1_s_q_l_1_1_abstract_s_q_l_statement_a97c746cfb641d4e3370c491de36af137}} 
\index{Qore::SQL::AbstractSQLStatement@{Qore::SQL::AbstractSQLStatement}!getValue@{getValue}}
\index{getValue@{getValue}!Qore::SQL::AbstractSQLStatement@{Qore::SQL::AbstractSQLStatement}}
\doxysubsubsection{\texorpdfstring{getValue()}{getValue()}}
{\footnotesize\ttfamily abstract \+\_\+\+\_\+7\+\_\+ \mbox{\hyperlink{group__type__conversion__functions_ga24ee71727f0785d3b826833ed6f5e2ee}{hash}}$<$ auto $>$ Qore\+::\+SQL\+::\+Abstract\+SQLStatement\+::get\+Value (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [pure virtual]}}



Retrieves the current row as a hash where the keys are the column names and the values are the column values. 

Use with \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_abstract_s_q_l_statement_a45f7bd62a339149daa3f859012eb626f}{Abstract\+SQLStatement\+::next()}} to iterate through the results of a select statement one row at a time

\begin{DoxyReturn}{Returns}
the current row as a hash where the keys are the column names and the values are the column values
\end{DoxyReturn}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}{0}
\DoxyCodeLine{\textcolor{keywordflow}{while} (stmt.next()) \{}
\DoxyCodeLine{    hash<auto> h = stmt.getValue();}
\DoxyCodeLine{\}}

\end{DoxyCode}

\end{DoxyParagraph}

\begin{DoxyExceptions}{Exceptions}
{\em SQLSTATEMENT-\/\+ERROR} & No SQL has been set with \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_abstract_s_q_l_statement_a480f30622fff523ee188297b1eebfa79}{Abstract\+SQLStatement\+::prepare()}} or \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_abstract_s_q_l_statement_a0f5d70f9678cd823fb1eb7aa99052fdd}{Abstract\+SQLStatement\+::prepare\+Raw()}}\\
\hline
\end{DoxyExceptions}
\begin{DoxyNote}{Note}

\begin{DoxyItemize}
\item Equivalent to \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_abstract_s_q_l_statement_a80ff8fb63f5cb85f4df46cf4a6c76a7e}{Abstract\+SQLStatement\+::fetch\+Row()}}
\item Exceptions could be thrown by the DBI driver when the statement is prepared or when attempting to bind the given arguments to buffer specifications or when the statement is executed or when row values are retrieved; see the relevant DBI driver docs for more information 
\end{DoxyItemize}
\end{DoxyNote}


Implements \mbox{\hyperlink{class_qore_1_1_abstract_iterator_aa01374b285003faa21b045082063ac12}{Qore\+::\+Abstract\+Iterator}}.



Implemented in \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_s_q_l_statement_a24eba920efaef94c1dd98bf02363f0c9}{Qore\+::\+SQL\+::\+SQLStatement}}.

\mbox{\Hypertarget{class_qore_1_1_s_q_l_1_1_abstract_s_q_l_statement_a5ad904da252b6bf7ebf80a9262c8b827}\label{class_qore_1_1_s_q_l_1_1_abstract_s_q_l_statement_a5ad904da252b6bf7ebf80a9262c8b827}} 
\index{Qore::SQL::AbstractSQLStatement@{Qore::SQL::AbstractSQLStatement}!memberGate@{memberGate}}
\index{memberGate@{memberGate}!Qore::SQL::AbstractSQLStatement@{Qore::SQL::AbstractSQLStatement}}
\doxysubsubsection{\texorpdfstring{memberGate()}{memberGate()}}
{\footnotesize\ttfamily abstract auto Qore\+::\+SQL\+::\+Abstract\+SQLStatement\+::member\+Gate (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}}}]{member }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [pure virtual]}}



Returns the value of the given column for the current row. 


\begin{DoxyParams}{Parameters}
{\em member} & the column name\\
\hline
\end{DoxyParams}
\begin{DoxySince}{Since}
Qore 1.\+12.\+1 
\end{DoxySince}


Implemented in \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_s_q_l_statement_af7fe60e95959cc5eb6cf0046adcb9ec6}{Qore\+::\+SQL\+::\+SQLStatement}}.

\mbox{\Hypertarget{class_qore_1_1_s_q_l_1_1_abstract_s_q_l_statement_a45f7bd62a339149daa3f859012eb626f}\label{class_qore_1_1_s_q_l_1_1_abstract_s_q_l_statement_a45f7bd62a339149daa3f859012eb626f}} 
\index{Qore::SQL::AbstractSQLStatement@{Qore::SQL::AbstractSQLStatement}!next@{next}}
\index{next@{next}!Qore::SQL::AbstractSQLStatement@{Qore::SQL::AbstractSQLStatement}}
\doxysubsubsection{\texorpdfstring{next()}{next()}}
{\footnotesize\ttfamily abstract bool Qore\+::\+SQL\+::\+Abstract\+SQLStatement\+::next (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [pure virtual]}}



Increments the row pointer when retrieving rows from a select statement; returns \mbox{\hyperlink{basic_data_types_True}{True}} if there is a row to retrieve, \mbox{\hyperlink{basic_data_types_False}{False}} if not. 

If this method returns True, then call \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_abstract_s_q_l_statement_a80ff8fb63f5cb85f4df46cf4a6c76a7e}{Abstract\+SQLStatement\+::fetch\+Row()}} afterwards to retrieve the row

\begin{DoxyReturn}{Returns}
\mbox{\hyperlink{basic_data_types_True}{True}} if there is a row to retrieve, \mbox{\hyperlink{basic_data_types_False}{False}} if not (no more rows to be retrieved)
\end{DoxyReturn}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}{0}
\DoxyCodeLine{\textcolor{keywordflow}{while} (stmt.next()) \{}
\DoxyCodeLine{    hash<auto> h = stmt.fetchRow();}
\DoxyCodeLine{\}}

\end{DoxyCode}

\end{DoxyParagraph}

\begin{DoxyExceptions}{Exceptions}
{\em SQLSTATEMENT-\/\+ERROR} & No SQL has been set with \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_abstract_s_q_l_statement_a480f30622fff523ee188297b1eebfa79}{Abstract\+SQLStatement\+::prepare()}} or \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_abstract_s_q_l_statement_a0f5d70f9678cd823fb1eb7aa99052fdd}{Abstract\+SQLStatement\+::prepare\+Raw()}}\\
\hline
\end{DoxyExceptions}
\begin{DoxyNote}{Note}
Exceptions could be thrown by the DBI driver when the statement is prepared or when attempting to bind the given arguments to buffer specifications or when the statement is executed; see the relevant DBI driver docs for more information 
\end{DoxyNote}


Implements \mbox{\hyperlink{class_qore_1_1_abstract_iterator_ab10d5694cc2fcd3b6689ea7494da79de}{Qore\+::\+Abstract\+Iterator}}.



Implemented in \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_s_q_l_statement_a34dfdc4d3aa9d3c38817931986506fbd}{Qore\+::\+SQL\+::\+SQLStatement}}.

\mbox{\Hypertarget{class_qore_1_1_s_q_l_1_1_abstract_s_q_l_statement_a480f30622fff523ee188297b1eebfa79}\label{class_qore_1_1_s_q_l_1_1_abstract_s_q_l_statement_a480f30622fff523ee188297b1eebfa79}} 
\index{Qore::SQL::AbstractSQLStatement@{Qore::SQL::AbstractSQLStatement}!prepare@{prepare}}
\index{prepare@{prepare}!Qore::SQL::AbstractSQLStatement@{Qore::SQL::AbstractSQLStatement}}
\doxysubsubsection{\texorpdfstring{prepare()}{prepare()}}
{\footnotesize\ttfamily abstract nothing Qore\+::\+SQL\+::\+Abstract\+SQLStatement\+::prepare (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}}}]{sql,  }\item[{}]{... }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [pure virtual]}}



Saves an \mbox{\hyperlink{namespace_qore_1_1_s_q_l}{SQL}} statement that will be prepared and executed later, along with optional arguments. 

The statement is actually only prepared when used for the first time, this is so that \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_s_q_l_statement}{SQLStatement}} objects created with \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_datasource_pool}{Datasource\+Pool}} objects use the \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_datasource_pool}{Datasource\+Pool}} more efficiently, as many drivers require the actual DB API prepare call to be made on the same connection as the connection the statement will be executed on as well.

\begin{DoxyNote}{Note}
This method parses the \mbox{\hyperlink{namespace_qore_1_1_s_q_l}{SQL}} string for placeholders and bind by value tokens ({\ttfamily \%v}); for a version of this method that does not parse the \mbox{\hyperlink{namespace_qore_1_1_s_q_l}{SQL}} string for placeholders and bind by value tokens, see \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_abstract_s_q_l_statement_a0f5d70f9678cd823fb1eb7aa99052fdd}{Abstract\+SQLStatement\+::prepare\+Raw()}}.
\end{DoxyNote}

\begin{DoxyParams}{Parameters}
{\em sql} & The \mbox{\hyperlink{namespace_qore_1_1_s_q_l}{SQL}} string to prepare for execution on the DB server\\
\hline
\end{DoxyParams}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}{0}
\DoxyCodeLine{stmt.prepare(\textcolor{stringliteral}{"{}select * from table where id = \%v"{}});}

\end{DoxyCode}
 
\end{DoxyParagraph}


Implemented in \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_s_q_l_statement_ad05790f42e735a8ba687fcbc93d1480a}{Qore\+::\+SQL\+::\+SQLStatement}}.

\mbox{\Hypertarget{class_qore_1_1_s_q_l_1_1_abstract_s_q_l_statement_a0f5d70f9678cd823fb1eb7aa99052fdd}\label{class_qore_1_1_s_q_l_1_1_abstract_s_q_l_statement_a0f5d70f9678cd823fb1eb7aa99052fdd}} 
\index{Qore::SQL::AbstractSQLStatement@{Qore::SQL::AbstractSQLStatement}!prepareRaw@{prepareRaw}}
\index{prepareRaw@{prepareRaw}!Qore::SQL::AbstractSQLStatement@{Qore::SQL::AbstractSQLStatement}}
\doxysubsubsection{\texorpdfstring{prepareRaw()}{prepareRaw()}}
{\footnotesize\ttfamily abstract nothing Qore\+::\+SQL\+::\+Abstract\+SQLStatement\+::prepare\+Raw (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}}}]{sql }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [pure virtual]}}



Saves an \mbox{\hyperlink{namespace_qore_1_1_s_q_l}{SQL}} statement that will be prepared and executed later. 

The statement is actually only prepared when used for the first time, this is so that \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_s_q_l_statement}{SQLStatement}} objects created with \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_datasource_pool}{Datasource\+Pool}} objects use the \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_datasource_pool}{Datasource\+Pool}} more efficiently, as many drivers require the actual DB API prepare call to be made on the same connection as the connection the statement will be executed on as well.

\begin{DoxyNote}{Note}
This method does not parse the \mbox{\hyperlink{namespace_qore_1_1_s_q_l}{SQL}} string for placeholders and bind by value tokens ({\ttfamily \%v}); for a version of this method that does parse the \mbox{\hyperlink{namespace_qore_1_1_s_q_l}{SQL}} string for placeholders and bind by value tokens, see \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_abstract_s_q_l_statement_a480f30622fff523ee188297b1eebfa79}{Abstract\+SQLStatement\+::prepare()}}.
\end{DoxyNote}

\begin{DoxyParams}{Parameters}
{\em sql} & The \mbox{\hyperlink{namespace_qore_1_1_s_q_l}{SQL}} string to prepare for execution on the DB server\\
\hline
\end{DoxyParams}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}{0}
\DoxyCodeLine{stmt.prepareRaw(\textcolor{stringliteral}{"{}select * from table"{}});}

\end{DoxyCode}
 
\end{DoxyParagraph}


Implemented in \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_s_q_l_statement_aa0dadef84dc71fa6bb0dd1cac491f100}{Qore\+::\+SQL\+::\+SQLStatement}}.

\mbox{\Hypertarget{class_qore_1_1_s_q_l_1_1_abstract_s_q_l_statement_ad243d89229ee65a43fe33d29137217c4}\label{class_qore_1_1_s_q_l_1_1_abstract_s_q_l_statement_ad243d89229ee65a43fe33d29137217c4}} 
\index{Qore::SQL::AbstractSQLStatement@{Qore::SQL::AbstractSQLStatement}!rollback@{rollback}}
\index{rollback@{rollback}!Qore::SQL::AbstractSQLStatement@{Qore::SQL::AbstractSQLStatement}}
\doxysubsubsection{\texorpdfstring{rollback()}{rollback()}}
{\footnotesize\ttfamily abstract nothing Qore\+::\+SQL\+::\+Abstract\+SQLStatement\+::rollback (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [pure virtual]}}



Closes the \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_s_q_l_statement}{SQLStatement}}, performs a transaction rollback, and releases the connection or the transaction lock according to the object used in the Abstract\+SQLStatement\+::constructor(), and closes the \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_s_q_l_statement}{SQLStatement}}. 

\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}{0}
\DoxyCodeLine{stmt.rollback();}

\end{DoxyCode}

\end{DoxyParagraph}
\begin{DoxyNote}{Note}
For possible exceptions; see DBI driver docs for the \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_abstract_s_q_l_statement_ad243d89229ee65a43fe33d29137217c4}{rollback()}} method 
\end{DoxyNote}


Implemented in \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_s_q_l_statement_a545ae07df1d373713d431515dc778ce1}{Qore\+::\+SQL\+::\+SQLStatement}}.

\mbox{\Hypertarget{class_qore_1_1_s_q_l_1_1_abstract_s_q_l_statement_ac43800cdf66d8a1e021989194d330306}\label{class_qore_1_1_s_q_l_1_1_abstract_s_q_l_statement_ac43800cdf66d8a1e021989194d330306}} 
\index{Qore::SQL::AbstractSQLStatement@{Qore::SQL::AbstractSQLStatement}!valid@{valid}}
\index{valid@{valid}!Qore::SQL::AbstractSQLStatement@{Qore::SQL::AbstractSQLStatement}}
\doxysubsubsection{\texorpdfstring{valid()}{valid()}}
{\footnotesize\ttfamily abstract bool Qore\+::\+SQL\+::\+Abstract\+SQLStatement\+::valid (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [pure virtual]}}



returns \mbox{\hyperlink{basic_data_types_True}{True}} if the object is currently pointing at a valid element, \mbox{\hyperlink{basic_data_types_False}{False}} if not (use when iterating with \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_abstract_s_q_l_statement_a45f7bd62a339149daa3f859012eb626f}{Abstract\+SQLStatement\+::next()}}) 

\begin{DoxyReturn}{Returns}
\mbox{\hyperlink{basic_data_types_True}{True}} if the object is currently pointing at a valid element, \mbox{\hyperlink{basic_data_types_False}{False}} if not
\end{DoxyReturn}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}{0}
\DoxyCodeLine{\textcolor{keywordflow}{if} (i.valid())}
\DoxyCodeLine{    printf(\textcolor{stringliteral}{"{}current value: \%y\(\backslash\)n"{}}, i.getValue());}

\end{DoxyCode}
 
\end{DoxyParagraph}


Implements \mbox{\hyperlink{class_qore_1_1_abstract_iterator_aee1def5d872b487b8917a166d9b263e8}{Qore\+::\+Abstract\+Iterator}}.



Implemented in \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_s_q_l_statement_a62c5937fb1ce112f54fdfe6f4f49ae24}{Qore\+::\+SQL\+::\+SQLStatement}}.

