X-Git-Url: https://git.teslayout.com/public/public/public/?a=blobdiff_plain;f=include%2Fanna%2Fdbms%2FDatabase.hpp;fp=include%2Fanna%2Fdbms%2FDatabase.hpp;h=0000000000000000000000000000000000000000;hb=851ff2962362fd5bad874e8ed91445b296eaca24;hp=bbe46c59490b5200eb282083986a8a963a5c99eb;hpb=78be86969d2f26a9084b0c4af6ce43d5fa4ed3fd;p=anna.git diff --git a/include/anna/dbms/Database.hpp b/include/anna/dbms/Database.hpp deleted file mode 100644 index bbe46c5..0000000 --- a/include/anna/dbms/Database.hpp +++ /dev/null @@ -1,296 +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 // - - -#ifndef anna_dbms_Database_hpp -#define anna_dbms_Database_hpp - -#include - -#include - -#include - -namespace anna { - -namespace comm { -class INetAddress; -class Delivery; -} - -namespace dbms { - -class Statement; -class InputBind; -class OutputBind; -class Data; -class FailRecoveryHandler; -class StatementTranslator; - -/** - Clase que modela la interaccion entre la base y nuestra aplicacion. -*/ -class Database : public app::Component { -public: - /** - Numero maximo de conexiones que podemos crear. - */ - static const int MaxConnection = 32; - - /** - Formas de conexion a la base de datos. - */ - struct Type { - enum _v { Local, Remote } value; - Type() : value(Local) {;} - Type(const _v v) : value(v) {;} - Type(const Type& v) : value(v.value) {;} - operator int () const throw() { return value; } - }; - - typedef std::vector ::const_iterator const_connection_iterator; /**::const_iterator const_statement_iterator; /**::iterator connection_iterator; /** a_connections; - std::vector a_statements; - const Type a_type; - FailRecoveryHandler* a_failRecoveryHandler; - StatementTranslator* a_statementTranslator; - - Database(const Database&); - - void do_cloneChild() throw(RuntimeException); - - virtual Connection* allocateConnection(const std::string& name, const char* user, const char* password) - throw(RuntimeException) = 0; - - virtual Statement* allocateStatement(const char* name, const std::string& expression, const bool isCritical) - throw(RuntimeException) = 0; - - virtual InputBind* allocateInputBind(const char* name, Data& data) - throw(RuntimeException) = 0; - virtual void deallocate(InputBind* inputBind) throw() = 0; - - virtual OutputBind* allocateOutputBind(const char* name, Data& data) - throw(RuntimeException) = 0; - virtual void deallocate(OutputBind* outputBind) throw() = 0; - - friend class Statement; - friend ResultCode Connection::execute(Statement*) throw(RuntimeException, DatabaseException); -}; - -} -} - -#endif