mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-07-28 22:03:40 -06:00
SqlExp: CURRENT_DATE, CURRENT_TIMESTAMP support
git-svn-id: svn://ultimatepp.org/upp/trunk@6399 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
88e2d28532
commit
95e91e4428
2 changed files with 13 additions and 0 deletions
|
|
@ -374,6 +374,16 @@ SqlVal NextDay(const SqlVal& date) {//TODO Dialect!
|
|||
return SqlFunc("next_day", date);
|
||||
}
|
||||
|
||||
SqlVal SqlCurrentDate() {
|
||||
return SqlVal(SqlCase(SQLITE3, "date('now')")
|
||||
("current_date"), SqlVal::HIGH);
|
||||
}
|
||||
|
||||
SqlVal SqlCurrentTime() {
|
||||
return SqlVal(SqlCase(SQLITE3, "time('now')")
|
||||
("current_timestamp"), SqlVal::HIGH);
|
||||
}
|
||||
|
||||
SqlVal Cast(const char* type, const SqlId& a) {
|
||||
return SqlFunc(type, a);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -285,6 +285,9 @@ SqlVal LastDay(const SqlVal& date);
|
|||
SqlVal MonthsBetween(const SqlVal& date1, const SqlVal& date2);
|
||||
SqlVal NextDay(const SqlVal& date);
|
||||
|
||||
SqlVal SqlCurrentDate();
|
||||
SqlVal SqlCurrentTime();
|
||||
|
||||
SqlVal Cast(const char* type, const SqlId& a);
|
||||
|
||||
SqlVal SqlNvl(const SqlVal& a);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue