OmniSciDB  471d68cefb
 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 443 of file DBEngine.cpp.

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

Referenced by main().

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

+ Here is the caller graph for this function:

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

DBEngine external methods

Definition at line 463 of file DBEngine.cpp.

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

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

+ Here is the call graph for this function:

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

Definition at line 468 of file DBEngine.cpp.

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

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

+ Here is the call graph for this function:

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

Definition at line 473 of file DBEngine.cpp.

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

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

+ Here is the call graph for this function:

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

Definition at line 490 of file DBEngine.cpp.

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

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

+ Here is the call graph for this function:

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

Definition at line 485 of file DBEngine.cpp.

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

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

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

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

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

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

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

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

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

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

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

+ Here is the call graph for this function:


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