DCL 4.0
Loading...
Searching...
No Matches
SQLCore.cpp File Reference
#include <dcl/Config.h>
#include <string.h>
#include <wchar.h>
#include <dcl/Object.h>
#include <dcl/Thread.h>
#include <dcl/Array.h>
#include <dcl/ListedHashMap.h>
#include <dcl/SQLCore.h>

Go to the source code of this file.

Classes

struct  __SQL_ERROR

Macros

#define __SQLERROR_MSG(code, msg)
#define DATA_TYPE_NAME(type)
#define __CHECK_ADDRESS(p)
#define __SET_ERROR(_errorCode)
#define __SET_ERROR(_errorCode)
#define __SET_ERROR(_errorCode)

Typedefs

typedef __DCL_BEGIN_NAMESPACE struct __SQL_ERROR SQL_ERROR

Functions

 IMPLEMENT_CLASSINFO (SQL::Field, Object) SQL
 IMPLEMENT_CLASSINFO (SQL::Param, SQL::Field) SQL
 IMPLEMENT_CLASSINFO (SQL::Query, Object) SQL
 IMPLEMENT_CLASSINFO (SQL::Connection, Object) long SQL

Macro Definition Documentation

◆ __CHECK_ADDRESS

#define __CHECK_ADDRESS ( p)
Value:
{ \
if (p == NULL) { \
__SET_ERROR(eBadAddress); \
return false; \
} \
}
#define NULL
Definition Config.h:340

Definition at line 139 of file SQLCore.cpp.

139#define __CHECK_ADDRESS(p) \
140{ \
141 if (p == NULL) { \
142 __SET_ERROR(eBadAddress); \
143 return false; \
144 } \
145}

◆ __SET_ERROR [1/3]

#define __SET_ERROR ( _errorCode)
Value:
__queryHandle->connection()->setErrorStatus(_errorCode, __THIS_FILE__, __LINE__)
#define __THIS_FILE__
Definition _trace.h:14

Definition at line 150 of file SQLCore.cpp.

150#define __SET_ERROR(_errorCode) \
151 __queryHandle->connection()->setErrorStatus(_errorCode, __THIS_FILE__, __LINE__)

◆ __SET_ERROR [2/3]

#define __SET_ERROR ( _errorCode)
Value:
__connHandle->setErrorStatus(_errorCode, __THIS_FILE__, __LINE__)

Definition at line 150 of file SQLCore.cpp.

150#define __SET_ERROR(_errorCode) \
151 __queryHandle->connection()->setErrorStatus(_errorCode, __THIS_FILE__, __LINE__)

◆ __SET_ERROR [3/3]

#define __SET_ERROR ( _errorCode)
Value:
setErrorStatus(_errorCode, __THIS_FILE__, __LINE__)

Definition at line 150 of file SQLCore.cpp.

150#define __SET_ERROR(_errorCode) \
151 __queryHandle->connection()->setErrorStatus(_errorCode, __THIS_FILE__, __LINE__)

◆ __SQLERROR_MSG

#define __SQLERROR_MSG ( code,
msg )
Value:
{code, __T(msg) }
#define __T(str)
Definition Object.h:44

Definition at line 37 of file SQLCore.cpp.

◆ DATA_TYPE_NAME

#define DATA_TYPE_NAME ( type)
Value:
case type : return __T(#type)

Definition at line 106 of file SQLCore.cpp.

Typedef Documentation

◆ SQL_ERROR

typedef __DCL_BEGIN_NAMESPACE struct __SQL_ERROR SQL_ERROR

Function Documentation

◆ IMPLEMENT_CLASSINFO() [1/4]

IMPLEMENT_CLASSINFO ( SQL::Connection ,
Object  )

Definition at line 639 of file SQLCore.cpp.

642{
643 return Thread::incrementAndGet(__refCount);
644}
static long incrementAndGet(volatile long &_n)

◆ IMPLEMENT_CLASSINFO() [2/4]

IMPLEMENT_CLASSINFO ( SQL::Field ,
Object  )

Definition at line 153 of file SQLCore.cpp.

156{
157 __queryHandle = _queryHandle;
158 __dataType = typeUnknown;
159 __precision = -1;
160 __scale = 0;
161}

◆ IMPLEMENT_CLASSINFO() [3/4]

IMPLEMENT_CLASSINFO ( SQL::Param ,
SQL::Field  )

Definition at line 289 of file SQLCore.cpp.

292 : Field(_queryHandle)
293{
294}

◆ IMPLEMENT_CLASSINFO() [4/4]

IMPLEMENT_CLASSINFO ( SQL::Query ,
Object  )

Definition at line 515 of file SQLCore.cpp.

518{
519 __connHandle = _connHandle;
520 __eof = true;
521 __affectedRows = -1;
522
523 __fieldCount = 0;
524 __paramCount = 0;
525 __placeholder = L'?';
526
527 __states = stStandBy;
528
529 __connHandle->addRef();
530}