SqlExp: IsSame (PGSQL, MySql) new equality test which is null safe (null == null yields true)

git-svn-id: svn://ultimatepp.org/upp/trunk@2566 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
cxl 2010-07-24 21:01:24 +00:00
parent 796523da04
commit 907ca39c54
5 changed files with 12 additions and 6 deletions

View file

@ -80,16 +80,12 @@ void Ctrl::TimerProc(dword time)
return;
sTimerLock.Enter();
TimeEvent *list = tevents();
if(sTClick > time)
for(TimeEvent *e = list->GetNext(); e != list; e = e->GetNext())
if(e->time > 0x80000000)
e->time = 0;
sTClick = time;
sTimerLock.Leave();
Ctrl::CheckMouseCtrl();
Ctrl::SyncCaret();
sTimerLock.Enter();
while(list->GetNext() != list && list->GetNext()->time < time) {
while(list->GetNext() != list && ((int)(time - list->GetNext()->time)) > 0) {
TimeEvent *e = list->GetNext();
e->Unlink();
if(e->delay < 0)

View file

@ -2369,6 +2369,9 @@ void ArrayCtrl::SerializeSettings(Stream& s)
DoColumnSort();
}
void ArrayCtrl::Serialize(Stream& s)
{
}
void ArrayCtrl::Reset() {
header.Reset();

View file

@ -35,6 +35,7 @@ public:
virtual void LostFocus();
virtual void ChildGotFocus();
virtual void ChildLostFocus();
virtual void Serialize(Stream& s);
public:
struct IdInfo {

View file

@ -49,6 +49,11 @@ SqlBool operator!=(const SqlVal& a, const SqlVal& b) {
}
SqlBool IsSame(const SqlVal& a, const SqlVal& b)
{
return SqlBool(a, SqlCase(MY_SQL, "<=>")(" is not distinct from "), b, SqlS::COMP);
}
SqlBool operator&&(const SqlBool& a, const SqlBool& b) {
if(a.IsEmpty() || a.IsTrue()) return b;
if(b.IsEmpty() || b.IsTrue()) return a;
@ -86,7 +91,6 @@ SqlBool SqlFirstRow() {
}
SqlBool Like(const SqlVal& a, const SqlVal& b, bool cs) {
return SqlBool(a, SqlCase
(MY_SQL, " like binary ")
(PGSQL, cs ? " like " : " ilike ")

View file

@ -319,6 +319,8 @@ SqlBool operator>(const SqlVal& a, const SqlVal& b);
SqlBool operator==(const SqlVal& a, const SqlVal& b);
SqlBool operator!=(const SqlVal& a, const SqlVal& b);
SqlBool IsSame(const SqlVal& a, const SqlVal& b);
SqlBool operator||(const SqlBool& a, const SqlBool& b);
SqlBool operator&&(const SqlBool& a, const SqlBool& b);
SqlBool operator- (const SqlBool& a, const SqlBool& b);