X-Git-Url: https://git.teslayout.com/public/public/public/?a=blobdiff_plain;f=source%2Fdbms%2FOutputBind.cpp;fp=source%2Fdbms%2FOutputBind.cpp;h=53e6b2388e11e07a48f972884c2ca6558f41e831;hb=78be86969d2f26a9084b0c4af6ce43d5fa4ed3fd;hp=0000000000000000000000000000000000000000;hpb=a3b95648bd76140ef55e0b5941d423eee6c3856f;p=anna.git diff --git a/source/dbms/OutputBind.cpp b/source/dbms/OutputBind.cpp new file mode 100644 index 0000000..53e6b23 --- /dev/null +++ b/source/dbms/OutputBind.cpp @@ -0,0 +1,37 @@ +// 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 + +using namespace anna; +using namespace std; + +void dbms::OutputBind::write() const +throw(RuntimeException, dbms::DatabaseException) { + const dbms::Data& data = Bind::getData(); + + if(data.getType() != Data::Type::LongBlock) { + string msg("anna::dbms::OutputBind::write | "); + msg += data.asString(); + msg += " | This method only can be called for anna::dbms::LongBlock types"; + throw RuntimeException(msg, ANNA_FILE_LOCATION); + } + + LOGDEBUG( + string msg("anna::dbms::OutputBind::write | "); + msg += data.asString(); + Logger::debug(msg, ANNA_FILE_LOCATION); + ); + do_write(reinterpret_cast (data)); +} + +