9#if __DCL_HAVE_ALLOC_DEBUG
10#undef __DCL_ALLOC_LEVEL
11#define __DCL_ALLOC_LEVEL __DCL_ALLOC_INTERNAL
28void SQLConnection::initialize(
SQLDriver* _driver)
84 ByteString
bs = UTF8Encoder::encode(_connString);
86 if (!__handle->open(
bs,
bs.length())) {
119 ByteString
bstr = UTF8Encoder::encode(_strSQL);
176 ByteBuffer*
buf = ByteBuffer::create(
len);
185 return UTF8Decoder::decode(
r);
197SQLConnectionPool::SQLConnectionPool(
198 const String& _connString,
199 const String& _driverName
207 __connString = _connString;
209 __allMax = (size_t)-1;
212SQLConnectionPool::~SQLConnectionPool()
220 SQLConnection*
r =
NULL;
232 catch(SQLException* e) {
244 catch (SQLException* e) {
249 catch (AssertError* e) {
270 while(nCloseCount--) {
276 catch(Exception* e) {
278 __T(
"SQLConnectionPool::clear(): %ls\n"),
286 catch (Exception* _e) {
296bool SQLConnectionPool::setMaxCount(
size_t _idleMax,
size_t _allMax
313void SQLConnectionPool::clear(
unsigned _waitSeconds)
321 && (_waitSeconds-- > 0)) {
331 __T(
"Warning! SQLConnection 강제 삭제!!! count(%d)\n"),
337 PointerArray::Iterator it =
__allConns.begin();
340 delete (SQLConnection*)((*it));
342 catch(Exception* e) {
344 __T(
"SQLConnectionPool::clear(): %ls\n"),
#define __DCL_THROWS2(e1, e2)
#define __DCL_TRACE1(fmt, arg1)
#define __DCL_ASSERT_PARAM(expr)
#define __DCL_ASSERT(expr)
#define IMPLEMENT_CLASSINFO(class_name, base_class_name)
void CharsetConvertException *__fields clear()
virtual String toString() const
bool getServerInfo(char *_pbuf, size_t *_pn)
void execute(const String &_sql) __DCL_THROWS2(SQLException *
String CharsetConvertException *bool canTransact() const
SQLConnection(SQLDriver *_driver)
void rollbackTrans() __DCL_THROWS1(SQLException *)
String getServerInfo() __DCL_THROWS2(SQLException *
bool inTransaction() const
SQL::Connection * __handle
void open(const String &_connString) __DCL_THROWS2(SQLException *
void commitTrans() __DCL_THROWS1(SQLException *)
void CharsetConvertException *void startTrans() __DCL_THROWS1(SQLException *)
void CharsetConvertException *void close() __DCL_THROWS1(SQLException *)
static SQLDriver * getDriver(const String &_name) __DCL_THROWS1(SQLDriverException *)
SQL::Connection * createConnection()
virtual String toString() const
static void sleep(unsigned int _mills)