1 #ifndef __EIENDB_BASE_HPP__ 2 #define __EIENDB_BASE_HPP__ 11 #if defined(_MSC_VER) || defined(WIN32) 12 #pragma warning( disable: 4251 ) 13 #ifdef EIENDB_DLL_EXPORTS 14 #define EIENDB_DLL __declspec(dllexport) 16 #define EIENDB_DLL __declspec(dllimport) 19 #define EIENDB_API __stdcall 29 #define EIENDB_FUNC_DECL(ret) EIENDB_DLL ret EIENDB_API 30 #define EIENDB_FUNC_IMPL(ret) ret EIENDB_API 34 #define interface struct 70 virtual bool connect();
107 virtual size_t affectedRows();
113 virtual size_t insertId();
203 virtual operator bool()
const = 0;
215 virtual bool bind(
size_t paramIndex,
winux::Mixed const & val );
236 virtual bool dataSeek(
size_t index );
242 virtual bool fetchRow(
winux::Mixed * fields,
int type = 0 );
259 virtual size_t fieldsCount();
264 virtual size_t rowsCount();
326 virtual bool deleteOne(
winux::Mixed const & prkValue );
346 virtual bool bind(
size_t paramIndex,
winux::Mixed const & val )
override;
349 operator bool()
const {
return !_orgSql.empty(); }
354 winux::Mixed const & getParam(
size_t paramIndex )
const;
365 bool _isGeneratedSql;
367 std::vector< std::pair< size_t, winux::Mixed > > _bindingParams;
368 std::vector< std::pair< winux::String, winux::Mixed > > _bindingNameParams;
381 virtual bool addNew(
winux::Mixed const & fields )
override;
386 virtual bool deleteOne(
winux::Mixed const & prkValue )
override;
387 virtual bool deleteEx(
winux::String const & where )
override;
391 virtual void _getTableInfo();
408 #endif // __EIENDB_BASE_HPP__ XString< char > AnsiString
winux::String MixedToEscapedStr(winux::Mixed const &m, IDbConnection *cnn, winux::String const &addQuote="\'")
Mixed变量连结进SQL语句时的换码操作
void * DbHandle
数据库各种对象资源的指针类型
winux::StringArray _prkColumn
Mixed const mxNull
Mixed(MT_NULL)常量对象
std::map< String, Mixed > StringMixedMap
IDbConnection * getCnn() const
#define EIENDB_FUNC_DECL(ret)
#define DISABLE_OBJECT_COPY(clsname)
DbError(int errType, winux::AnsiString const &s)
std::vector< Mixed > MixedArray
XStringArray< tchar > StringArray
winux::StringArray _fieldNames