DCL 3.7.4
Loading...
Searching...
No Matches
IBField.cpp File Reference
#include <dcl/Config.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include <ibase.h>
#include <dcl/Object.h>
#include <dcl/Numeric.h>
#include <dcl/BytesOutputStream.h>
#include <dcl/Charset.h>
#include <dcl/SQLCore.h>
#include "IBConnection.h"
#include "IBQuery.h"
#include "IBField.h"

Go to the source code of this file.

Classes

union  __INT_TYPE

Macros

#define __TRACE_THIS   0
#define __DCL_TRACE0_N(fmt)
#define __DCL_TRACE1_N(fmt, arg)
#define __DCL_TRACE2_N(fmt, arg1, arg2)
#define __DCL_TRACE3_N(fmt, arg1, arg2, arg3)
#define __DCL_TRACE4_N(fmt, arg1, arg2, arg3, arg4)
#define __SET_ERROR(_error)
#define __SET_ERROR_MSG(_msg)
#define __SQLTYPE_IS(__sqltype)
#define SQLTYPE_NAME(_dataType, name)

Functions

 IMPLEMENT_CLASSINFO (IBField, SQL::Field) IBField
const wchar_t * __dataTypeName (const XSQLVAR *_sqlvar)
unsigned int __ABS (int _n)
size_t __MIN (size_t x, size_t y)

Macro Definition Documentation

◆ __DCL_TRACE0_N

#define __DCL_TRACE0_N ( fmt)

Definition at line 32 of file IBField.cpp.

◆ __DCL_TRACE1_N

#define __DCL_TRACE1_N ( fmt,
arg )

Definition at line 33 of file IBField.cpp.

◆ __DCL_TRACE2_N

#define __DCL_TRACE2_N ( fmt,
arg1,
arg2 )

Definition at line 34 of file IBField.cpp.

◆ __DCL_TRACE3_N

#define __DCL_TRACE3_N ( fmt,
arg1,
arg2,
arg3 )

Definition at line 35 of file IBField.cpp.

◆ __DCL_TRACE4_N

#define __DCL_TRACE4_N ( fmt,
arg1,
arg2,
arg3,
arg4 )

Definition at line 36 of file IBField.cpp.

◆ __SET_ERROR

#define __SET_ERROR ( _error)
Value:
conn()->setErrorHandle(_error, __THIS_FILE__, __LINE__)
#define __THIS_FILE__
Definition _trace.h:14

Definition at line 44 of file IBField.cpp.

44#define __SET_ERROR(_error) \
45 conn()->setErrorHandle(_error, __THIS_FILE__, __LINE__)

◆ __SET_ERROR_MSG

#define __SET_ERROR_MSG ( _msg)
Value:
conn()->setErrorMessage(_msg, __THIS_FILE__, __LINE__)

Definition at line 46 of file IBField.cpp.

46#define __SET_ERROR_MSG(_msg) \
47 conn()->setErrorMessage(_msg, __THIS_FILE__, __LINE__)

◆ __SQLTYPE_IS

#define __SQLTYPE_IS ( __sqltype)
Value:
((__sqlvar->sqltype & ~1) == __sqltype)

◆ __TRACE_THIS

#define __TRACE_THIS   0

Definition at line 24 of file IBField.cpp.

◆ SQLTYPE_NAME

#define SQLTYPE_NAME ( _dataType,
name )
Value:
case _dataType : return L ## name

Definition at line 238 of file IBField.cpp.

Function Documentation

◆ __ABS()

unsigned int __ABS ( int _n)
inline

Definition at line 1121 of file IBField.cpp.

1122{
1123 return _n < 0 ? -_n : _n;
1124}

◆ __dataTypeName()

const wchar_t * __dataTypeName ( const XSQLVAR * _sqlvar)

Definition at line 240 of file IBField.cpp.

241{
242 switch(_sqlvar->sqltype & ~1) {
243 SQLTYPE_NAME(SQL_BOOLEAN, "BOOLEAN");
244 case SQL_SHORT:
245 case SQL_LONG:
246 case SQL_INT64: {
247 if (_sqlvar->sqlscale) {
248 switch (_sqlvar->sqltype & ~1) {
249 SQLTYPE_NAME(SQL_SHORT, "DECIMAL16");
250 SQLTYPE_NAME(SQL_LONG, "DECIMAL32");
251 SQLTYPE_NAME(SQL_INT64, "DECIMAL64");
252 }
253 }
254 else {
255 switch (_sqlvar->sqltype & ~1) {
256 SQLTYPE_NAME(SQL_SHORT, "SMALLINT");
257 SQLTYPE_NAME(SQL_LONG, "INTEGER");
258 SQLTYPE_NAME(SQL_INT64, "INT64");
259 }
260 }
261 }
262 SQLTYPE_NAME(SQL_FLOAT, "FLOAT");
263 SQLTYPE_NAME(SQL_DOUBLE, "DOUBLE");
264 SQLTYPE_NAME(SQL_TYPE_DATE, "DATE");
265 SQLTYPE_NAME(SQL_TYPE_TIME, "TIME");
266 SQLTYPE_NAME(SQL_TIMESTAMP, "TIMESTAMP");
267#if defined(FIREBIRD_IBASE_H) && FB_API_VER >= 40
268 SQLTYPE_NAME(SQL_TIME_TZ_EX, "TIME WITH TIMEZONE");
269 SQLTYPE_NAME(SQL_TIMESTAMP_TZ_EX, "TIMESTAMP WITH TIMEZONE");
270#endif
271 SQLTYPE_NAME(SQL_TEXT, "CHAR");
272 SQLTYPE_NAME(SQL_VARYING, "VARCHAR");
273 case SQL_BLOB: {
274 if (_sqlvar->sqlsubtype == 1)
275 return L"BLOB(TEXT)";
276 else
277 return L"BLOB";
278 }
279 }
280 return L"Unknown Type: Driver is not Support";
281}
#define SQLTYPE_NAME(_dataType, name)
Definition IBField.cpp:238

◆ __MIN()

size_t __MIN ( size_t x,
size_t y )
inline

Definition at line 1320 of file IBField.cpp.

1321{
1322 return x < y ? x : y;
1323}

◆ IMPLEMENT_CLASSINFO()

IMPLEMENT_CLASSINFO ( IBField ,
SQL::Field  )

Definition at line 49 of file IBField.cpp.

54 : Field(NULL)
55{
56 __sqlvar = NULL;
57 __indicator = 0; /* NOT NULL의 경우 체크하지 않는다. 때문에 초기값은
58 NOT NULL (0) 으로 둔다. */
59
60 __maxDataSize = 0;
61 __dataSize = 0;
62}
#define NULL
Definition Config.h:312