mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-07-11 22:03:01 -06:00
Sql: Sql0 (without session)
git-svn-id: svn://ultimatepp.org/upp/trunk@4305 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
418c76a798
commit
ee0aa395a2
2 changed files with 6 additions and 4 deletions
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue