mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-07-11 22:03:01 -06:00
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:
parent
796523da04
commit
907ca39c54
5 changed files with 12 additions and 6 deletions
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -2369,6 +2369,9 @@ void ArrayCtrl::SerializeSettings(Stream& s)
|
|||
DoColumnSort();
|
||||
}
|
||||
|
||||
void ArrayCtrl::Serialize(Stream& s)
|
||||
{
|
||||
}
|
||||
|
||||
void ArrayCtrl::Reset() {
|
||||
header.Reset();
|
||||
|
|
|
|||
|
|
@ -35,6 +35,7 @@ public:
|
|||
virtual void LostFocus();
|
||||
virtual void ChildGotFocus();
|
||||
virtual void ChildLostFocus();
|
||||
virtual void Serialize(Stream& s);
|
||||
|
||||
public:
|
||||
struct IdInfo {
|
||||
|
|
|
|||
|
|
@ -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 ")
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue