dbapi_tools.h
675 Bytes
#ifndef __DBAPI_TOOLS_H__
#define __DBAPI_TOOLS_H__
#include "AnubisSupport.h"
#ifdef WITH_SQLAPI
BEGIN_NAMESPACE(CM);
class AnubisAllocator;
END_NAMESPACE(CM)
// SQLAPI++
class SAField;
class SADateTime;
bool MakeDbError(int error_code, const char * error_msg, U32 * var_dst, CM::AnubisAllocator *allocator);
U32 MakeDbDatum(const SAField & field, CM::AnubisAllocator *allocator);
SADateTime DateAndTime_2_SADateTime(U32 dt_ptr);
U32 SADateTime_2_DateAndTime(const SADateTime & dt, CM::AnubisAllocator * allocator);
#define DbStmt_2_SACommand(stmt) \
((SACommand *) ((U32*)(((U32 *)(stmt))[1]))[1])
#endif //def WITH_SQLAPI
#endif //ndef __DBAPI_TOOLS_H__