OmniSciDB  72c90bc290
 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 450 of file DBEngine.cpp.

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

Referenced by main().

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

+ Here is the caller graph for this function:

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

DBEngine external methods

Definition at line 470 of file DBEngine.cpp.

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

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

+ Here is the call graph for this function:

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

Definition at line 475 of file DBEngine.cpp.

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

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

+ Here is the call graph for this function:

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

Definition at line 480 of file DBEngine.cpp.

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

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

+ Here is the call graph for this function:

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

Definition at line 497 of file DBEngine.cpp.

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

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

+ Here is the call graph for this function:

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

Definition at line 492 of file DBEngine.cpp.

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

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

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

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

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

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

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

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

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

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

+ Here is the call graph for this function:


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