\hypertarget{class_s_c_i_run_1_1_core_1_1_database_1_1_database_manager}{\section{Database\-Manager Class Reference}
\label{class_s_c_i_run_1_1_core_1_1_database_1_1_database_manager}\index{Database\-Manager@{Database\-Manager}}
}


{\ttfamily \#include $<$Database\-Manager.\-h$>$}

Inheritance diagram for Database\-Manager\-:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[height=2.000000cm]{class_s_c_i_run_1_1_core_1_1_database_1_1_database_manager}
\end{center}
\end{figure}
\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\hyperlink{class_s_c_i_run_1_1_core_1_1_database_1_1_database_manager_abdff684005abb4254f5f231ec28b942a}{Database\-Manager} ()
\item 
\hyperlink{class_s_c_i_run_1_1_core_1_1_database_1_1_database_manager_a6b82ba8e6d3fb9030384b835d5851133}{$\sim$\-Database\-Manager} ()
\item 
bool \hyperlink{class_s_c_i_run_1_1_core_1_1_database_1_1_database_manager_a4d841f1a9d21e9be7a0270513b33c5be}{run\-\_\-sql\-\_\-statement} (const std\-::string \&sql\-\_\-str, \hyperlink{namespace_s_c_i_run_1_1_core_1_1_database_a1517ed740a00ae5a5a6a06d8ccabdc55}{Result\-Set} \&results, std\-::string \&error)
\item 
bool \hyperlink{class_s_c_i_run_1_1_core_1_1_database_1_1_database_manager_a54a45155a144a01eb851b1d4d5278041}{run\-\_\-sql\-\_\-statement} (const std\-::string \&sql\-\_\-str, std\-::string \&error)
\item 
bool \hyperlink{class_s_c_i_run_1_1_core_1_1_database_1_1_database_manager_a729347db7e71c5b94ebb856dac8f79b2}{run\-\_\-sql\-\_\-script} (const std\-::string \&sql\-\_\-str, std\-::string \&error)
\item 
bool \hyperlink{class_s_c_i_run_1_1_core_1_1_database_1_1_database_manager_a3a87fe73e32228d6f69a7f709dfedf37}{save\-\_\-database} (const boost\-::filesystem\-::path \&database\-\_\-file, std\-::string \&error)
\item 
bool \hyperlink{class_s_c_i_run_1_1_core_1_1_database_1_1_database_manager_a94d402407e7a84c4d12457cb670c2c69}{load\-\_\-database} (const boost\-::filesystem\-::path \&database\-\_\-file, std\-::string \&error)
\item 
long long \hyperlink{class_s_c_i_run_1_1_core_1_1_database_1_1_database_manager_ad871caa4b911f804dbce9a0b784119f9}{get\-\_\-last\-\_\-insert\-\_\-rowid} ()
\item 
bool \hyperlink{class_s_c_i_run_1_1_core_1_1_database_1_1_database_manager_a94dd909b23c83b466fa2fedfa3763aae}{get\-\_\-column\-\_\-metadata} (const std\-::string \&table\-\_\-name, const std\-::string \&column\-\_\-name, char const $\ast$$\ast$data\-\_\-type=0, char const $\ast$$\ast$coll\-\_\-seq=0, int $\ast$not\-\_\-null=0, int $\ast$primary\-\_\-key=0, int $\ast$auto\-\_\-inc=0)
\end{DoxyCompactItemize}
\subsection*{Static Public Member Functions}
\begin{DoxyCompactItemize}
\item 
static std\-::string \hyperlink{class_s_c_i_run_1_1_core_1_1_database_1_1_database_manager_acc737346af3a3650a84c4a15a005ace6}{Escape\-Quotes} (const std\-::string \&str)
\end{DoxyCompactItemize}


\subsection{Constructor \& Destructor Documentation}
\hypertarget{class_s_c_i_run_1_1_core_1_1_database_1_1_database_manager_abdff684005abb4254f5f231ec28b942a}{\index{S\-C\-I\-Run\-::\-Core\-::\-Database\-::\-Database\-Manager@{S\-C\-I\-Run\-::\-Core\-::\-Database\-::\-Database\-Manager}!Database\-Manager@{Database\-Manager}}
\index{Database\-Manager@{Database\-Manager}!SCIRun::Core::Database::DatabaseManager@{S\-C\-I\-Run\-::\-Core\-::\-Database\-::\-Database\-Manager}}
\subsubsection[{Database\-Manager}]{\setlength{\rightskip}{0pt plus 5cm}{\bf Database\-Manager} (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)}}\label{class_s_c_i_run_1_1_core_1_1_database_1_1_database_manager_abdff684005abb4254f5f231ec28b942a}
\hypertarget{class_s_c_i_run_1_1_core_1_1_database_1_1_database_manager_a6b82ba8e6d3fb9030384b835d5851133}{\index{S\-C\-I\-Run\-::\-Core\-::\-Database\-::\-Database\-Manager@{S\-C\-I\-Run\-::\-Core\-::\-Database\-::\-Database\-Manager}!$\sim$\-Database\-Manager@{$\sim$\-Database\-Manager}}
\index{$\sim$\-Database\-Manager@{$\sim$\-Database\-Manager}!SCIRun::Core::Database::DatabaseManager@{S\-C\-I\-Run\-::\-Core\-::\-Database\-::\-Database\-Manager}}
\subsubsection[{$\sim$\-Database\-Manager}]{\setlength{\rightskip}{0pt plus 5cm}$\sim${\bf Database\-Manager} (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)}}\label{class_s_c_i_run_1_1_core_1_1_database_1_1_database_manager_a6b82ba8e6d3fb9030384b835d5851133}


\subsection{Member Function Documentation}
\hypertarget{class_s_c_i_run_1_1_core_1_1_database_1_1_database_manager_acc737346af3a3650a84c4a15a005ace6}{\index{S\-C\-I\-Run\-::\-Core\-::\-Database\-::\-Database\-Manager@{S\-C\-I\-Run\-::\-Core\-::\-Database\-::\-Database\-Manager}!Escape\-Quotes@{Escape\-Quotes}}
\index{Escape\-Quotes@{Escape\-Quotes}!SCIRun::Core::Database::DatabaseManager@{S\-C\-I\-Run\-::\-Core\-::\-Database\-::\-Database\-Manager}}
\subsubsection[{Escape\-Quotes}]{\setlength{\rightskip}{0pt plus 5cm}std\-::string Escape\-Quotes (
\begin{DoxyParamCaption}
\item[{const std\-::string \&}]{str}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [static]}}}\label{class_s_c_i_run_1_1_core_1_1_database_1_1_database_manager_acc737346af3a3650a84c4a15a005ace6}
E\-S\-C\-A\-P\-E\-Q\-U\-O\-T\-E\-S\-: Escape the quotes(') in the string so it can be used as text in a S\-Q\-L statement. \hypertarget{class_s_c_i_run_1_1_core_1_1_database_1_1_database_manager_a94dd909b23c83b466fa2fedfa3763aae}{\index{S\-C\-I\-Run\-::\-Core\-::\-Database\-::\-Database\-Manager@{S\-C\-I\-Run\-::\-Core\-::\-Database\-::\-Database\-Manager}!get\-\_\-column\-\_\-metadata@{get\-\_\-column\-\_\-metadata}}
\index{get\-\_\-column\-\_\-metadata@{get\-\_\-column\-\_\-metadata}!SCIRun::Core::Database::DatabaseManager@{S\-C\-I\-Run\-::\-Core\-::\-Database\-::\-Database\-Manager}}
\subsubsection[{get\-\_\-column\-\_\-metadata}]{\setlength{\rightskip}{0pt plus 5cm}bool get\-\_\-column\-\_\-metadata (
\begin{DoxyParamCaption}
\item[{const std\-::string \&}]{table\-\_\-name, }
\item[{const std\-::string \&}]{column\-\_\-name, }
\item[{char const $\ast$$\ast$}]{data\-\_\-type = {\ttfamily 0}, }
\item[{char const $\ast$$\ast$}]{coll\-\_\-seq = {\ttfamily 0}, }
\item[{int $\ast$}]{not\-\_\-null = {\ttfamily 0}, }
\item[{int $\ast$}]{primary\-\_\-key = {\ttfamily 0}, }
\item[{int $\ast$}]{auto\-\_\-inc = {\ttfamily 0}}
\end{DoxyParamCaption}
)}}\label{class_s_c_i_run_1_1_core_1_1_database_1_1_database_manager_a94dd909b23c83b466fa2fedfa3763aae}
G\-E\-T\-\_\-\-C\-O\-L\-U\-M\-N\-\_\-\-M\-E\-T\-A\-D\-A\-T\-A\-: Get metadata about a specific column of a specific database table. Returns true if the table and column exist, otherwise false. \hypertarget{class_s_c_i_run_1_1_core_1_1_database_1_1_database_manager_ad871caa4b911f804dbce9a0b784119f9}{\index{S\-C\-I\-Run\-::\-Core\-::\-Database\-::\-Database\-Manager@{S\-C\-I\-Run\-::\-Core\-::\-Database\-::\-Database\-Manager}!get\-\_\-last\-\_\-insert\-\_\-rowid@{get\-\_\-last\-\_\-insert\-\_\-rowid}}
\index{get\-\_\-last\-\_\-insert\-\_\-rowid@{get\-\_\-last\-\_\-insert\-\_\-rowid}!SCIRun::Core::Database::DatabaseManager@{S\-C\-I\-Run\-::\-Core\-::\-Database\-::\-Database\-Manager}}
\subsubsection[{get\-\_\-last\-\_\-insert\-\_\-rowid}]{\setlength{\rightskip}{0pt plus 5cm}long long get\-\_\-last\-\_\-insert\-\_\-rowid (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)}}\label{class_s_c_i_run_1_1_core_1_1_database_1_1_database_manager_ad871caa4b911f804dbce9a0b784119f9}
G\-E\-T\-\_\-\-L\-A\-S\-T\-\_\-\-I\-N\-S\-E\-R\-T\-\_\-\-R\-O\-W\-I\-D\-: Return the row I\-D of last successful insert statement. \hypertarget{class_s_c_i_run_1_1_core_1_1_database_1_1_database_manager_a94d402407e7a84c4d12457cb670c2c69}{\index{S\-C\-I\-Run\-::\-Core\-::\-Database\-::\-Database\-Manager@{S\-C\-I\-Run\-::\-Core\-::\-Database\-::\-Database\-Manager}!load\-\_\-database@{load\-\_\-database}}
\index{load\-\_\-database@{load\-\_\-database}!SCIRun::Core::Database::DatabaseManager@{S\-C\-I\-Run\-::\-Core\-::\-Database\-::\-Database\-Manager}}
\subsubsection[{load\-\_\-database}]{\setlength{\rightskip}{0pt plus 5cm}bool load\-\_\-database (
\begin{DoxyParamCaption}
\item[{const boost\-::filesystem\-::path \&}]{database\-\_\-file, }
\item[{std\-::string \&}]{error}
\end{DoxyParamCaption}
)}}\label{class_s_c_i_run_1_1_core_1_1_database_1_1_database_manager_a94d402407e7a84c4d12457cb670c2c69}
L\-O\-A\-D\-\_\-\-D\-A\-T\-A\-B\-A\-S\-E\-: Load the database from disk \hypertarget{class_s_c_i_run_1_1_core_1_1_database_1_1_database_manager_a729347db7e71c5b94ebb856dac8f79b2}{\index{S\-C\-I\-Run\-::\-Core\-::\-Database\-::\-Database\-Manager@{S\-C\-I\-Run\-::\-Core\-::\-Database\-::\-Database\-Manager}!run\-\_\-sql\-\_\-script@{run\-\_\-sql\-\_\-script}}
\index{run\-\_\-sql\-\_\-script@{run\-\_\-sql\-\_\-script}!SCIRun::Core::Database::DatabaseManager@{S\-C\-I\-Run\-::\-Core\-::\-Database\-::\-Database\-Manager}}
\subsubsection[{run\-\_\-sql\-\_\-script}]{\setlength{\rightskip}{0pt plus 5cm}bool run\-\_\-sql\-\_\-script (
\begin{DoxyParamCaption}
\item[{const std\-::string \&}]{sql\-\_\-str, }
\item[{std\-::string \&}]{error}
\end{DoxyParamCaption}
)}}\label{class_s_c_i_run_1_1_core_1_1_database_1_1_database_manager_a729347db7e71c5b94ebb856dac8f79b2}
R\-U\-N\-\_\-\-S\-Q\-L\-\_\-\-S\-C\-R\-I\-P\-T\-: Execute multiple S\-Q\-L statements sequentially. \hypertarget{class_s_c_i_run_1_1_core_1_1_database_1_1_database_manager_a4d841f1a9d21e9be7a0270513b33c5be}{\index{S\-C\-I\-Run\-::\-Core\-::\-Database\-::\-Database\-Manager@{S\-C\-I\-Run\-::\-Core\-::\-Database\-::\-Database\-Manager}!run\-\_\-sql\-\_\-statement@{run\-\_\-sql\-\_\-statement}}
\index{run\-\_\-sql\-\_\-statement@{run\-\_\-sql\-\_\-statement}!SCIRun::Core::Database::DatabaseManager@{S\-C\-I\-Run\-::\-Core\-::\-Database\-::\-Database\-Manager}}
\subsubsection[{run\-\_\-sql\-\_\-statement}]{\setlength{\rightskip}{0pt plus 5cm}bool run\-\_\-sql\-\_\-statement (
\begin{DoxyParamCaption}
\item[{const std\-::string \&}]{sql\-\_\-str, }
\item[{{\bf Result\-Set} \&}]{results, }
\item[{std\-::string \&}]{error}
\end{DoxyParamCaption}
)}}\label{class_s_c_i_run_1_1_core_1_1_database_1_1_database_manager_a4d841f1a9d21e9be7a0270513b33c5be}
R\-U\-N\-\_\-\-S\-Q\-L\-\_\-\-S\-T\-A\-T\-E\-M\-E\-N\-T\-: Execute the given S\-Q\-L statement on the database. If the statement generates any results, they will be put in the result set. Returns true on success, otherwise false. \hypertarget{class_s_c_i_run_1_1_core_1_1_database_1_1_database_manager_a54a45155a144a01eb851b1d4d5278041}{\index{S\-C\-I\-Run\-::\-Core\-::\-Database\-::\-Database\-Manager@{S\-C\-I\-Run\-::\-Core\-::\-Database\-::\-Database\-Manager}!run\-\_\-sql\-\_\-statement@{run\-\_\-sql\-\_\-statement}}
\index{run\-\_\-sql\-\_\-statement@{run\-\_\-sql\-\_\-statement}!SCIRun::Core::Database::DatabaseManager@{S\-C\-I\-Run\-::\-Core\-::\-Database\-::\-Database\-Manager}}
\subsubsection[{run\-\_\-sql\-\_\-statement}]{\setlength{\rightskip}{0pt plus 5cm}bool run\-\_\-sql\-\_\-statement (
\begin{DoxyParamCaption}
\item[{const std\-::string \&}]{sql\-\_\-str, }
\item[{std\-::string \&}]{error}
\end{DoxyParamCaption}
)}}\label{class_s_c_i_run_1_1_core_1_1_database_1_1_database_manager_a54a45155a144a01eb851b1d4d5278041}
R\-U\-N\-\_\-\-S\-Q\-L\-\_\-\-S\-T\-A\-T\-E\-M\-E\-N\-T\-: Execute the given S\-Q\-L statement on the database. Returns true on success, otherwise false. \hypertarget{class_s_c_i_run_1_1_core_1_1_database_1_1_database_manager_a3a87fe73e32228d6f69a7f709dfedf37}{\index{S\-C\-I\-Run\-::\-Core\-::\-Database\-::\-Database\-Manager@{S\-C\-I\-Run\-::\-Core\-::\-Database\-::\-Database\-Manager}!save\-\_\-database@{save\-\_\-database}}
\index{save\-\_\-database@{save\-\_\-database}!SCIRun::Core::Database::DatabaseManager@{S\-C\-I\-Run\-::\-Core\-::\-Database\-::\-Database\-Manager}}
\subsubsection[{save\-\_\-database}]{\setlength{\rightskip}{0pt plus 5cm}bool save\-\_\-database (
\begin{DoxyParamCaption}
\item[{const boost\-::filesystem\-::path \&}]{database\-\_\-file, }
\item[{std\-::string \&}]{error}
\end{DoxyParamCaption}
)}}\label{class_s_c_i_run_1_1_core_1_1_database_1_1_database_manager_a3a87fe73e32228d6f69a7f709dfedf37}
S\-A\-V\-E\-\_\-\-D\-A\-T\-A\-B\-A\-S\-E\-: Save the database to disk 

The documentation for this class was generated from the following files\-:\begin{DoxyCompactItemize}
\item 
Core/\-Database\-Manager/\hyperlink{_database_manager_8h}{Database\-Manager.\-h}\item 
Core/\-Database\-Manager/\hyperlink{_database_manager_8cc}{Database\-Manager.\-cc}\end{DoxyCompactItemize}
