Sql: Sql0 (without session)

git-svn-id: svn://ultimatepp.org/upp/trunk@4305 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
cxl 2011-12-15 10:34:35 +00:00
parent 418c76a798
commit ee0aa395a2
2 changed files with 6 additions and 4 deletions

View file

@ -153,7 +153,7 @@ Sql& AppCursor()
return sGlobalSession->GetSessionSql();
static Sql *empty;
ONCELOCK {
static Sql h(Sql::NULLSQL);
static Sql0 h;
empty = &h;
}
return *empty;
@ -175,7 +175,7 @@ Sql& AppCursorR()
return sGlobalSession->GetSessionSqlR();
static Sql *empty;
ONCELOCK {
static Sql h(Sql::NULLSQL);
static Sql0 h;
empty = &h;
}
return *empty;

View file

@ -92,8 +92,6 @@ class Sql {
friend Sql& AppCursorR();
Value Select0(const String& what);
enum _NULLSQL { NULLSQL };
Sql(_NULLSQL) { cn = NULL; }
public:
void SetSession(SqlSource& src);
@ -251,6 +249,10 @@ private:
Sql(const Sql&);
};
struct Sql0 : Sql {
Sql0() : Sql((SqlConnection *)NULL) {}
};
#ifndef NOAPPSQL
struct SqlR : Sql {
SqlR();