OmniSciDB  85c2d10cdc
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros 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 442 of file DBEngine.cpp.

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

Referenced by main().

442  {
443  const std::lock_guard<std::mutex> lock(engine_create_mutex);
444  auto engine = std::make_shared<DBEngineImpl>();
445  if (!engine->init(cmd_line)) {
446  throw std::runtime_error("DBE initialization failed");
447  }
448  return engine;
449 }

+ Here is the caller graph for this function:

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

DBEngine external methods

Definition at line 462 of file DBEngine.cpp.

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

462  {
463  DBEngineImpl* engine = getImpl(this);
464  engine->executeDDL(query);
465 }
DBEngineImpl * getImpl(DBEngine *ptr)
Definition: DBEngine.cpp:453

+ Here is the call graph for this function:

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

Definition at line 467 of file DBEngine.cpp.

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

467  {
468  DBEngineImpl* engine = getImpl(this);
469  return engine->executeDML(query);
470 }
DBEngineImpl * getImpl(DBEngine *ptr)
Definition: DBEngine.cpp:453

+ Here is the call graph for this function:

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

Definition at line 472 of file DBEngine.cpp.

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

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

+ Here is the call graph for this function:

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

Definition at line 489 of file DBEngine.cpp.

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

489  {
490  DBEngineImpl* engine = getImpl(this);
491  return engine->getTableDetails(table_name);
492 }
DBEngineImpl * getImpl(DBEngine *ptr)
Definition: DBEngine.cpp:453

+ Here is the call graph for this function:

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

Definition at line 484 of file DBEngine.cpp.

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

484  {
485  DBEngineImpl* engine = getImpl(this);
486  return engine->getTables();
487 }
DBEngineImpl * getImpl(DBEngine *ptr)
Definition: DBEngine.cpp:453

+ 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 477 of file DBEngine.cpp.

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

479  {
480  DBEngineImpl* engine = getImpl(this);
481  engine->importArrowTable(name, table, fragment_size);
482 }
string name
Definition: setup.in.py:62
DBEngineImpl * getImpl(DBEngine *ptr)
Definition: DBEngine.cpp:453

+ 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 499 of file DBEngine.cpp.

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

501  {
502  DBEngineImpl* engine = getImpl(this);
503  return engine->login(db_name, user_name, password);
504 }
DBEngineImpl * getImpl(DBEngine *ptr)
Definition: DBEngine.cpp:453

+ 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 494 of file DBEngine.cpp.

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

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

+ Here is the call graph for this function:


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