X-Git-Url: https://git.teslayout.com/public/public/public/?a=blobdiff_plain;f=include%2Fanna%2Fdbms.mysql%2FInputBind.hpp;fp=include%2Fanna%2Fdbms.mysql%2FInputBind.hpp;h=8f58e1e5ad61448a4db74d8cf372a7816bccfc2b;hb=78be86969d2f26a9084b0c4af6ce43d5fa4ed3fd;hp=0000000000000000000000000000000000000000;hpb=a3b95648bd76140ef55e0b5941d423eee6c3856f;p=anna.git diff --git a/include/anna/dbms.mysql/InputBind.hpp b/include/anna/dbms.mysql/InputBind.hpp new file mode 100644 index 0000000..8f58e1e --- /dev/null +++ b/include/anna/dbms.mysql/InputBind.hpp @@ -0,0 +1,57 @@ +// 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_mysql_InputBind_hpp +#define anna_dbms_mysql_InputBind_hpp + +#include + +#include + +namespace anna { + +class DataBlock; + +namespace dbms { + +class Data; +class Statement; + +namespace mysql { + +class Statement; + +class InputBind : public dbms::InputBind, public BaseBind { +public: + InputBind(const char* name, dbms::Data& data); + virtual ~InputBind(); + +private: + void code() const throw(RuntimeException); + + void codeShortBlock(dbms::Data&) throw(); + void codeDate(dbms::Data&) throw(); + + static char asCharacter(const char byte) + throw() { + return (byte >= 0 && byte <= 9) ? (byte + '0') : ((byte - 0xa) + 'A'); + } + + /* Funciones virtuales puras */ + void prepare(anna::dbms::Statement*, anna::dbms::Connection*, const int pos) throw(RuntimeException); + void release(anna::dbms::Statement*) throw() {;} + + friend class mysql::Statement; +}; + +} +} +} + +#endif +