OmniSciDB
a5dc49c757
|
#include <SqliteConnector.h>
Classes | |
struct | NullableResult |
Public Types | |
enum | BindType { BindType::TEXT = 1, BindType::BLOB, BindType::NULL_TYPE } |
Public Member Functions | |
SqliteConnector (const std::string &dbName, const std::string &dir=".") | |
SqliteConnector (sqlite3 *db) | |
SqliteConnector () | |
virtual | ~SqliteConnector () |
void | reset (const std::string &path) |
virtual void | query (const std::string &queryString) |
virtual void | query_with_text_params (std::string const &query_only) |
template<typename STRING_CONTAINER > | |
void | query_with_text_params (STRING_CONTAINER const &query_and_text_params) |
virtual void | query_with_text_params (const std::string &queryString, const std::vector< std::string > &text_param) |
virtual void | query_with_text_params (const std::string &queryString, const std::vector< std::string > &text_params, const std::vector< BindType > &bind_types) |
virtual void | query_with_text_param (const std::string &queryString, const std::string &text_param) |
virtual void | batch_insert (const std::string &table_name, std::vector< std::vector< std::string >> &insert_vals) |
virtual size_t | getNumRows () const |
virtual size_t | getNumCols () const |
template<typename T > | |
T | getData (const int row, const int col) |
bool | isNull (const int row, const int col) const |
auto | getSqlitePtr () const |
Public Attributes | |
std::vector< std::string > | columnNames |
std::vector< int > | columnTypes |
Private Member Functions | |
void | throwError () |
Private Attributes | |
sqlite3 * | db_ |
std::string | dbName_ |
bool | atFirstResult_ |
std::vector< std::vector < NullableResult > > | results_ |
size_t | numCols_ |
size_t | numRows_ |
Definition at line 33 of file SqliteConnector.h.
|
strong |
Enumerator | |
---|---|
TEXT | |
BLOB | |
NULL_TYPE |
Definition at line 60 of file SqliteConnector.h.
SqliteConnector::SqliteConnector | ( | const std::string & | dbName, |
const std::string & | dir = "." |
||
) |
SqliteConnector::SqliteConnector | ( | sqlite3 * | db | ) |
Definition at line 47 of file SqliteConnector.cpp.
|
inline |
Definition at line 37 of file SqliteConnector.h.
|
virtual |
Definition at line 49 of file SqliteConnector.cpp.
|
virtual |
Definition at line 153 of file SqliteConnector.cpp.
References db_, query(), and throwError().
|
inline |
Definition at line 75 of file SqliteConnector.h.
References numCols_, numRows_, results_, and heavydb.dtypes::T.
Referenced by Catalog_Namespace::Catalog::buildDictionaryMapUnlocked(), Catalog_Namespace::Catalog::createDashboardSystemRoles(), migrations::MigrationMgr::migrateDateInDaysMetadata(), Catalog_Namespace::Catalog::recordOwnershipOfObjectsInObjectPermissions(), SqliteMemDatabase::runSelect(), Catalog_Namespace::Catalog::updateDefaultColumnValues(), Catalog_Namespace::Catalog::updateDeletedColumnIndicator(), Catalog_Namespace::Catalog::updateDictionaryNames(), Catalog_Namespace::Catalog::updateDictionarySchema(), Catalog_Namespace::Catalog::updateFrontendViewSchema(), Catalog_Namespace::Catalog::updateLinkSchema(), Catalog_Namespace::Catalog::updatePageSize(), and Catalog_Namespace::Catalog::updateTableDescriptorSchema().
|
inlinevirtual |
Definition at line 72 of file SqliteConnector.h.
References numCols_.
Referenced by SqliteMemDatabase::runSelect().
|
inlinevirtual |
Definition at line 71 of file SqliteConnector.h.
References numRows_.
Referenced by Catalog_Namespace::Catalog::buildDictionaryMapUnlocked(), Catalog_Namespace::Catalog::createDashboardSystemRoles(), migrations::MigrationMgr::migrateDateInDaysMetadata(), Catalog_Namespace::Catalog::recordOwnershipOfObjectsInObjectPermissions(), Catalog_Namespace::Catalog::renameLegacyDataWrappers(), SqliteMemDatabase::runSelect(), Catalog_Namespace::Catalog::updateDefaultColumnValues(), Catalog_Namespace::Catalog::updateDeletedColumnIndicator(), Catalog_Namespace::Catalog::updateDictionaryNames(), Catalog_Namespace::Catalog::updateDictionarySchema(), Catalog_Namespace::Catalog::updateFixlenArrayColumns(), Catalog_Namespace::Catalog::updateFrontendViewAndLinkUsers(), Catalog_Namespace::Catalog::updateFrontendViewSchema(), Catalog_Namespace::Catalog::updateFrontendViewsToDashboards(), Catalog_Namespace::Catalog::updateGeoColumns(), Catalog_Namespace::Catalog::updateLinkSchema(), Catalog_Namespace::Catalog::updatePageSize(), and Catalog_Namespace::Catalog::updateTableDescriptorSchema().
|
inline |
|
inline |
Definition at line 81 of file SqliteConnector.h.
References numCols_, numRows_, and results_.
Referenced by SqliteMemDatabase::runSelect().
|
virtual |
Definition at line 149 of file SqliteConnector.cpp.
References query_with_text_params().
Referenced by batch_insert(), Catalog_Namespace::Catalog::buildDictionaryMapUnlocked(), Catalog_Namespace::Catalog::createDashboardSystemRoles(), migrations::MigrationMgr::migrateDateInDaysMetadata(), query_with_text_params(), Catalog_Namespace::Catalog::recordOwnershipOfObjectsInObjectPermissions(), Catalog_Namespace::Catalog::renameLegacyDataWrappers(), SqliteMemDatabase::runSelect(), Catalog_Namespace::Catalog::updateCustomExpressionsSchema(), Catalog_Namespace::Catalog::updateDefaultColumnValues(), Catalog_Namespace::Catalog::updateDeletedColumnIndicator(), Catalog_Namespace::Catalog::updateDictionaryNames(), Catalog_Namespace::Catalog::updateDictionarySchema(), Catalog_Namespace::Catalog::updateFixlenArrayColumns(), Catalog_Namespace::Catalog::updateFrontendViewAndLinkUsers(), Catalog_Namespace::Catalog::updateFrontendViewSchema(), Catalog_Namespace::Catalog::updateFrontendViewsToDashboards(), Catalog_Namespace::Catalog::updateFsiSchemas(), Catalog_Namespace::Catalog::updateGeoColumns(), Catalog_Namespace::Catalog::updateLinkSchema(), Catalog_Namespace::Catalog::updateLogicalToPhysicalTableLinkSchema(), Catalog_Namespace::Catalog::updateLogicalToPhysicalTableMap(), Catalog_Namespace::Catalog::updatePageSize(), and Catalog_Namespace::Catalog::updateTableDescriptorSchema().
|
virtual |
Definition at line 144 of file SqliteConnector.cpp.
References query_with_text_params().
|
inlinevirtual |
Definition at line 47 of file SqliteConnector.h.
References query().
Referenced by Catalog_Namespace::Catalog::createDashboardSystemRoles(), migrations::MigrationMgr::migrateDateInDaysMetadata(), query(), query_with_text_param(), query_with_text_params(), Catalog_Namespace::Catalog::recordOwnershipOfObjectsInObjectPermissions(), Catalog_Namespace::Catalog::renameLegacyDataWrappers(), Catalog_Namespace::Catalog::updateFixlenArrayColumns(), Catalog_Namespace::Catalog::updateGeoColumns(), and Catalog_Namespace::Catalog::updateLogicalToPhysicalTableMap().
|
inline |
Definition at line 51 of file SqliteConnector.h.
References query_with_text_params().
|
virtual |
Definition at line 138 of file SqliteConnector.cpp.
References query_with_text_params().
|
virtual |
Definition at line 71 of file SqliteConnector.cpp.
References atFirstResult_, BLOB, CHECK, CHECK_EQ, columnNames, columnTypes, db_, get_column_datum(), is_null(), NULL_TYPE, numCols_, numRows_, results_, and throwError().
|
inline |
|
private |
Definition at line 55 of file SqliteConnector.cpp.
References db_.
Referenced by batch_insert(), and query_with_text_params().
|
private |
Definition at line 102 of file SqliteConnector.h.
Referenced by query_with_text_params().
std::vector<std::string> SqliteConnector::columnNames |
Definition at line 87 of file SqliteConnector.h.
Referenced by query_with_text_params().
std::vector<int> SqliteConnector::columnTypes |
Definition at line 88 of file SqliteConnector.h.
Referenced by query_with_text_params(), and SqliteMemDatabase::runSelect().
|
private |
Definition at line 100 of file SqliteConnector.h.
Referenced by batch_insert(), getSqlitePtr(), query_with_text_params(), reset(), throwError(), and ~SqliteConnector().
|
private |
Definition at line 101 of file SqliteConnector.h.
Referenced by ~SqliteConnector().
|
private |
Definition at line 104 of file SqliteConnector.h.
Referenced by getData(), getNumCols(), isNull(), and query_with_text_params().
|
private |
Definition at line 105 of file SqliteConnector.h.
Referenced by getData(), getNumRows(), isNull(), and query_with_text_params().
|
private |
Definition at line 103 of file SqliteConnector.h.
Referenced by getData(), isNull(), and query_with_text_params().