OmniSciDB  a987f07e93
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
EmbeddedDatabase::DBEngine Class Reference

#include <DBEngine.h>

+ Inheritance diagram for EmbeddedDatabase::DBEngine:

Public Member Functions

virtual ~DBEngine ()
 
void executeDDL (const std::string &query)
 
std::shared_ptr< CursorexecuteDML (const std::string &query)
 
std::shared_ptr< CursorexecuteRA (const std::string &query)
 
void importArrowTable (const std::string &name, std::shared_ptr< arrow::Table > &table, uint64_t fragment_size=0)
 
std::vector< std::string > getTables ()
 
std::vector< ColumnDetailsgetTableDetails (const std::string &table_name)
 
bool setDatabase (std::string &db_name)
 
bool login (std::string &db_name, std::string &user_name, const std::string &password)
 

Static Public Member Functions

static std::shared_ptr< DBEnginecreate (const std::string &cmd_line)
 

Protected Member Functions

 DBEngine ()
 
 DBEngine (const DBEngine &)=delete
 
DBEngineoperator= (const DBEngine &)=delete
 

Detailed Description

Definition at line 39 of file DBEngine.h.

Constructor & Destructor Documentation

virtual EmbeddedDatabase::DBEngine::~DBEngine ( )
inlinevirtual

Definition at line 41 of file DBEngine.h.

41 {}
EmbeddedDatabase::DBEngine::DBEngine ( )
inlineprotected

Definition at line 55 of file DBEngine.h.

55 {}
EmbeddedDatabase::DBEngine::DBEngine ( const DBEngine )
protecteddelete

Member Function Documentation

std::shared_ptr< DBEngine > EmbeddedDatabase::DBEngine::create ( const std::string &  cmd_line)
static

Definition at line 452 of file DBEngine.cpp.

References test_exceptions::engine, and EmbeddedDatabase::anonymous_namespace{DBEngine.cpp}::engine_create_mutex.

Referenced by main().

452  {
453  const std::lock_guard<std::mutex> lock(engine_create_mutex);
454  auto engine = std::make_shared<DBEngineImpl>();
455  if (!engine->init(cmd_line)) {
456  throw std::runtime_error("DBE initialization failed");
457  }
458  return engine;
459 }

+ Here is the caller graph for this function:

void EmbeddedDatabase::DBEngine::executeDDL ( const std::string &  query)

DBEngine external methods

Definition at line 472 of file DBEngine.cpp.

References test_exceptions::engine, EmbeddedDatabase::DBEngineImpl::executeDDL(), and EmbeddedDatabase::getImpl().

472  {
473  DBEngineImpl* engine = getImpl(this);
474  engine->executeDDL(query);
475 }
DBEngineImpl * getImpl(DBEngine *ptr)
Definition: DBEngine.cpp:463

+ Here is the call graph for this function:

std::shared_ptr< Cursor > EmbeddedDatabase::DBEngine::executeDML ( const std::string &  query)

Definition at line 477 of file DBEngine.cpp.

References test_exceptions::engine, EmbeddedDatabase::DBEngineImpl::executeDML(), and EmbeddedDatabase::getImpl().

477  {
478  DBEngineImpl* engine = getImpl(this);
479  return engine->executeDML(query);
480 }
DBEngineImpl * getImpl(DBEngine *ptr)
Definition: DBEngine.cpp:463

+ Here is the call graph for this function:

std::shared_ptr< Cursor > EmbeddedDatabase::DBEngine::executeRA ( const std::string &  query)

Definition at line 482 of file DBEngine.cpp.

References test_exceptions::engine, EmbeddedDatabase::DBEngineImpl::executeRA(), and EmbeddedDatabase::getImpl().

482  {
483  DBEngineImpl* engine = getImpl(this);
484  return engine->executeRA(query);
485 }
DBEngineImpl * getImpl(DBEngine *ptr)
Definition: DBEngine.cpp:463

+ Here is the call graph for this function:

std::vector< ColumnDetails > EmbeddedDatabase::DBEngine::getTableDetails ( const std::string &  table_name)

Definition at line 499 of file DBEngine.cpp.

References test_exceptions::engine, EmbeddedDatabase::getImpl(), and EmbeddedDatabase::DBEngineImpl::getTableDetails().

499  {
500  DBEngineImpl* engine = getImpl(this);
501  return engine->getTableDetails(table_name);
502 }
DBEngineImpl * getImpl(DBEngine *ptr)
Definition: DBEngine.cpp:463

+ Here is the call graph for this function:

std::vector< std::string > EmbeddedDatabase::DBEngine::getTables ( )

Definition at line 494 of file DBEngine.cpp.

References test_exceptions::engine, EmbeddedDatabase::getImpl(), and EmbeddedDatabase::DBEngineImpl::getTables().

494  {
495  DBEngineImpl* engine = getImpl(this);
496  return engine->getTables();
497 }
DBEngineImpl * getImpl(DBEngine *ptr)
Definition: DBEngine.cpp:463

+ Here is the call graph for this function:

void EmbeddedDatabase::DBEngine::importArrowTable ( const std::string &  name,
std::shared_ptr< arrow::Table > &  table,
uint64_t  fragment_size = 0 
)

Definition at line 487 of file DBEngine.cpp.

References test_exceptions::engine, EmbeddedDatabase::getImpl(), and EmbeddedDatabase::DBEngineImpl::importArrowTable().

489  {
490  DBEngineImpl* engine = getImpl(this);
491  engine->importArrowTable(name, table, fragment_size);
492 }
DBEngineImpl * getImpl(DBEngine *ptr)
Definition: DBEngine.cpp:463
string name
Definition: setup.in.py:72

+ Here is the call graph for this function:

bool EmbeddedDatabase::DBEngine::login ( std::string &  db_name,
std::string &  user_name,
const std::string &  password 
)

Definition at line 509 of file DBEngine.cpp.

References test_exceptions::engine, EmbeddedDatabase::getImpl(), and EmbeddedDatabase::DBEngineImpl::login().

511  {
512  DBEngineImpl* engine = getImpl(this);
513  return engine->login(db_name, user_name, password);
514 }
DBEngineImpl * getImpl(DBEngine *ptr)
Definition: DBEngine.cpp:463

+ Here is the call graph for this function:

DBEngine& EmbeddedDatabase::DBEngine::operator= ( const DBEngine )
protecteddelete
bool EmbeddedDatabase::DBEngine::setDatabase ( std::string &  db_name)

Definition at line 504 of file DBEngine.cpp.

References test_exceptions::engine, EmbeddedDatabase::getImpl(), and EmbeddedDatabase::DBEngineImpl::setDatabase().

504  {
505  DBEngineImpl* engine = getImpl(this);
506  return engine->setDatabase(db_name);
507 }
DBEngineImpl * getImpl(DBEngine *ptr)
Definition: DBEngine.cpp:463

+ Here is the call graph for this function:


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