OmniSciDB  c1a53651b2
 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 451 of file DBEngine.cpp.

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

Referenced by main().

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

+ Here is the caller graph for this function:

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

DBEngine external methods

Definition at line 471 of file DBEngine.cpp.

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

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

+ Here is the call graph for this function:

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

Definition at line 476 of file DBEngine.cpp.

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

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

+ Here is the call graph for this function:

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

Definition at line 481 of file DBEngine.cpp.

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

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

+ Here is the call graph for this function:

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

Definition at line 498 of file DBEngine.cpp.

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

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

+ Here is the call graph for this function:

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

Definition at line 493 of file DBEngine.cpp.

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

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

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

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

488  {
489  DBEngineImpl* engine = getImpl(this);
490  engine->importArrowTable(name, table, fragment_size);
491 }
DBEngineImpl * getImpl(DBEngine *ptr)
Definition: DBEngine.cpp:462
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 508 of file DBEngine.cpp.

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

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

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

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

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

+ Here is the call graph for this function:


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