DCL 4.0
Loading...
Searching...
No Matches
SQLQuery.cpp File Reference
#include <dcl/Config.h>
#include <wchar.h>
#include <wctype.h>
#include <dcl/Object.h>
#include <dcl/Charset.h>
#include <dcl/SQL.h>

Go to the source code of this file.

Functions

__DCL_BEGIN_NAMESPACE IMPLEMENT_CLASSINFO (SQLFields, Object) SQLFields
 IMPLEMENT_CLASSINFO (SQLParams, Object) SQLParams
 IMPLEMENT_CLASSINFO (SQLQuery, Object) void SQLQuery
void CharsetConvertException *__fields clear ()
 __sql_transform__ (_sql, __handle->placeholder(), sql, names)
 if (!__handle->prepare(bstr, bstr.length(), names.size()))
 if (__handle->paramCount() > 0) __params.initialize(this
void CharsetConvertExceptionexecute ()

Variables

String sql
StringArray names
ByteString bstr = UTF8Encoder::encode(sql)

Function Documentation

◆ __sql_transform__()

__sql_transform__ ( _sql ,
__handle-> placeholder(),
sql ,
names  )

◆ clear()

void CharsetConvertException *__fields clear ( )

◆ execute()

void CharsetConvertException * execute ( )

◆ if() [1/2]

if ( !__handle-> preparebstr, bstr.length(), names.size())

Definition at line 295 of file SQLQuery.cpp.

295 {
296#ifdef __DCL_DEBUG
297 throw new SQLException(this, __sql);
298#else
299 throw new SQLException(this);
300#endif
301 }

◆ if() [2/2]

if ( __handle-> paramCount(),
0  )

◆ IMPLEMENT_CLASSINFO() [1/3]

__DCL_BEGIN_NAMESPACE IMPLEMENT_CLASSINFO ( SQLFields ,
Object  )

Definition at line 28 of file SQLQuery.cpp.

31{
32 __fields = NULL;
33 __count = 0;
34}
#define NULL
Definition Config.h:340

◆ IMPLEMENT_CLASSINFO() [2/3]

IMPLEMENT_CLASSINFO ( SQLParams ,
Object  )

Definition at line 111 of file SQLQuery.cpp.

114{
115 __params = NULL;
116 __count = 0;
117}

◆ IMPLEMENT_CLASSINFO() [3/3]

IMPLEMENT_CLASSINFO ( SQLQuery ,
Object  )

Definition at line 244 of file SQLQuery.cpp.

247{
248 __handle = NULL;
249 __connection = NULL;
250
251 __DCL_ASSERT(_conn != NULL);
252
253 SQL::Query* hQuery = NULL;
254 if (!_conn->handle()->createQueryInstance(&hQuery)) {
255 throw new SQLException(_conn);
256 }
257 __DCL_ASSERT(hQuery != NULL);
258
259 __handle = hQuery;
260 __connection = _conn;
261}
#define __DCL_ASSERT(expr)
Definition Object.h:371

Variable Documentation

◆ bstr

ByteString bstr = UTF8Encoder::encode(sql)

Definition at line 294 of file SQLQuery.cpp.

◆ names

names

Definition at line 290 of file SQLQuery.cpp.

◆ sql

String sql

Definition at line 289 of file SQLQuery.cpp.