1 // ANNA - Anna is Not Nothingness Anymore //
3 // (c) Copyright 2005-2015 Eduardo Ramos Testillano & Francisco Ruiz Rayo //
5 // See project site at http://redmine.teslayout.com/projects/anna-suite //
6 // See accompanying file LICENSE or copy at http://www.teslayout.com/projects/public/anna.LICENSE //
11 #include <anna/dbms.oracle/Descriptor.hpp>
12 #include <anna/dbms.oracle/Database.hpp>
13 #include <anna/dbms.oracle/Connection.hpp>
14 #include <anna/dbms.oracle/ResultCode.hpp>
18 dbms::oracle::Descriptor::~Descriptor() {
19 if(*reference != NULL) {
20 OCIDescriptorFree(*reference, type);
25 void dbms::oracle::Descriptor::allocate(dbms::oracle::Database& database, dbms::oracle::Connection* connection, const int _type)
26 throw(RuntimeException) {
27 if(*reference != NULL)
31 error = database.getErrorHandler();
32 context = *connection; // Invoca al operador de conversion
35 anna_dbms_oracle_check(OCIDescriptorAlloc(env, reference, type = _type, 0, 0), error);
36 } catch(DatabaseException& edb) {
37 throw RuntimeException(edb);