DCL 3.7.4
Loading...
Searching...
No Matches
SQLConnection.cpp File Reference
#include <dcl/Config.h>
#include <dcl/Object.h>
#include <dcl/Charset.h>
#include <dcl/Thread.h>
#include <dcl/SQL.h>

Go to the source code of this file.

Functions

__DCL_BEGIN_NAMESPACE IMPLEMENT_CLASSINFO (SQLConnection, Object) void SQLConnection
 IMPLEMENT_CLASSINFO (SQLConnectionPool, Object) SQLConnectionPool

Function Documentation

◆ IMPLEMENT_CLASSINFO() [1/2]

__DCL_BEGIN_NAMESPACE IMPLEMENT_CLASSINFO ( SQLConnection ,
Object  )

Definition at line 27 of file SQLConnection.cpp.

30{
31 __DCL_ASSERT_PARAM(_driver != NULL);
32
33 __handle = NULL;
34 __driver = NULL;
35 __connected = false;
36
37 SQL::Connection* _connHandle = _driver->createConnection();
38 __DCL_ASSERT(_connHandle != NULL);
39
40 __handle = _connHandle;
41 __driver = _driver;
42}
#define NULL
Definition Config.h:312
#define __DCL_ASSERT_PARAM(expr)
Definition Object.h:409
#define __DCL_ASSERT(expr)
Definition Object.h:394

◆ IMPLEMENT_CLASSINFO() [2/2]

IMPLEMENT_CLASSINFO ( SQLConnectionPool ,
Object  )

Definition at line 214 of file SQLConnection.cpp.

221{
222 __DCL_ASSERT(!_connString.isEmpty());
223 __DCL_ASSERT(!_driverName.isEmpty());
224
225 __sqlDriver = SQLDriver::getDriver(_driverName);
226 __connString = _connString;
227 __idleMax = 0;
228 __allMax = (size_t)-1; // unlimited
229}
static SQLDriver * getDriver(const String &_name) __DCL_THROWS1(SQLDriverException *)