Seg3D  2.4
Seg3D is a free volume segmentation and processing tool developed by the NIH Center for Integrative Biomedical Computing at the University of Utah Scientific Computing and Imaging (SCI) Institute.
Public Member Functions | Static Public Member Functions | List of all members
Seg3D::DatabaseManager Class Reference
Inheritance diagram for Seg3D::DatabaseManager:
Seg3D::ProjectManagerPrivate

Public Member Functions

 DatabaseManager (const DatabaseManager &src)
 
bool run_sql_statement (const std::string &sql_str, ResultSet &results, std::string &error)
 
bool run_sql_statement (const std::string &sql_str, std::string &error)
 
bool run_sql_script (const std::string &sql_str, std::string &error)
 
bool save_database (const boost::filesystem::path &database_file, std::string &error)
 
bool load_database (const boost::filesystem::path &database_file, std::string &error)
 
long long get_last_insert_rowid ()
 
bool get_column_metadata (const std::string &table_name, const std::string &column_name, char const **data_type=NULL, char const **coll_seq=NULL, int *not_null=NULL, int *primary_key=NULL, int *auto_inc=NULL)
 

Static Public Member Functions

static std::string EscapeQuotes (const std::string &str)
 

Member Function Documentation

std::string Seg3D::DatabaseManager::EscapeQuotes ( const std::string &  str)
static

ESCAPEQUOTES: Escape the quotes(') in the string so it can be used as text in a SQL statement.

bool Seg3D::DatabaseManager::get_column_metadata ( const std::string &  table_name,
const std::string &  column_name,
char const **  data_type = NULL,
char const **  coll_seq = NULL,
int *  not_null = NULL,
int *  primary_key = NULL,
int *  auto_inc = NULL 
)

GET_COLUMN_METADATA: Get metadata about a specific column of a specific database table. Returns true if the table and column exist, otherwise false.

long long Seg3D::DatabaseManager::get_last_insert_rowid ( )

GET_LAST_INSERT_ROWID: Return the row ID of last successful insert statement.

bool Seg3D::DatabaseManager::load_database ( const boost::filesystem::path &  database_file,
std::string &  error 
)

LOAD_DATABASE: Load the database from disk

bool Seg3D::DatabaseManager::run_sql_script ( const std::string &  sql_str,
std::string &  error 
)

RUN_SQL_SCRIPT: Execute multiple SQL statements sequentially.

bool Seg3D::DatabaseManager::run_sql_statement ( const std::string &  sql_str,
ResultSet &  results,
std::string &  error 
)

RUN_SQL_STATEMENT: Execute the given SQL statement on the database. If the statement generates any results, they will be put in the result set. Returns true on success, otherwise false.

bool Seg3D::DatabaseManager::run_sql_statement ( const std::string &  sql_str,
std::string &  error 
)

RUN_SQL_STATEMENT: Execute the given SQL statement on the database. Returns true on success, otherwise false.

bool Seg3D::DatabaseManager::save_database ( const boost::filesystem::path &  database_file,
std::string &  error 
)

SAVE_DATABASE: Save the database to disk


The documentation for this class was generated from the following files: