X-Git-Url: https://git.teslayout.com/public/public/public/?a=blobdiff_plain;f=source%2Fdbms.mysql%2FDatabase.cpp;fp=source%2Fdbms.mysql%2FDatabase.cpp;h=0000000000000000000000000000000000000000;hb=851ff2962362fd5bad874e8ed91445b296eaca24;hp=9508158a80d2c01c2e793f20235fc56b43351b0d;hpb=78be86969d2f26a9084b0c4af6ce43d5fa4ed3fd;p=anna.git diff --git a/source/dbms.mysql/Database.cpp b/source/dbms.mysql/Database.cpp deleted file mode 100644 index 9508158..0000000 --- a/source/dbms.mysql/Database.cpp +++ /dev/null @@ -1,77 +0,0 @@ -// ANNA - Anna is Not Nothingness Anymore // -// // -// (c) Copyright 2005-2015 Eduardo Ramos Testillano & Francisco Ruiz Rayo // -// // -// See project site at http://redmine.teslayout.com/projects/anna-suite // -// See accompanying file LICENSE or copy at http://www.teslayout.com/projects/public/anna.LICENSE // - - -#include - -#include -#include - -#include -#include - -using namespace std; -using namespace anna; -using namespace anna::dbms; - -mysql::Database::Database(const char* dbmsName, const char* host) : - dbms::Database(getClassName(), dbmsName) { - a_host = (host == NULL) ? NULL : strdup(host); - mysql::sccs::activate(); -} - -mysql::Database::Database(const char* componentName, const char* dbmsName, const char* host) : - dbms::Database(componentName, dbmsName) { - a_host = (host == NULL) ? NULL : strdup(host); - mysql::sccs::activate(); -} - -void mysql::Database::do_initialize() -throw(RuntimeException) { - LOGMETHOD(TraceMethod tm("anna::dbms::mysql::Database", "do_initialize", ANNA_FILE_LOCATION)); - dbms::Database::do_initialize(); -} - -//---------------------------------------------------------------------------------- -// Libera todos los manejadores asociados a este entorno. -//---------------------------------------------------------------------------------- -mysql::Database::~Database() { - LOGMETHOD(TraceMethod tm("anna::dbms::mysql::Database", "~Database", ANNA_FILE_LOCATION)); - - if(a_host != NULL) - free(a_host); -} - -dbms::Connection* mysql::Database::allocateConnection(const std::string& name, const char* user, const char* password) -throw(RuntimeException) { - return new Connection(*this, name, user, password); -} - -dbms::Statement* mysql::Database::allocateStatement(const char* name, const std::string& expression, const bool isCritical) -throw(RuntimeException) { - return new Statement(*this, name, expression, isCritical); -} - -dbms::InputBind* mysql::Database::allocateInputBind(const char* name, Data& data) -throw(RuntimeException) { - return new InputBind(name, data); -} - -void mysql::Database::deallocate(dbms::InputBind* inputBind) -throw() { - delete(InputBind*) inputBind; -} - -dbms::OutputBind* mysql::Database::allocateOutputBind(const char* name, Data& data) -throw(RuntimeException) { - return new OutputBind(name, data); -} - -void mysql::Database::deallocate(dbms::OutputBind* outputBind) -throw() { - delete(OutputBind*) outputBind; -}