Sql.patch
| uppsrc/Sql/SqlVal.cpp (working copy) | ||
|---|---|---|
| 374 | 374 |
return SqlFunc("next_day", date);
|
| 375 | 375 |
} |
| 376 | 376 | |
| 377 |
SqlVal SqlCurrentDate() {
|
|
| 378 |
return SqlVal(SqlCase(SQLITE3, "date('now')")
|
|
| 379 |
("current_date"), SqlVal::HIGH);
|
|
| 380 |
} |
|
| 381 | ||
| 382 |
SqlVal SqlCurrentTime() {
|
|
| 383 |
return SqlVal(SqlCase(SQLITE3, "time('now')")
|
|
| 384 |
("current_time"), SqlVal::HIGH);
|
|
| 385 |
} |
|
| 386 | ||
| 387 |
SqlVal SqlCurrentTimestamp() {
|
|
| 388 |
return SqlVal(SqlCase(SQLITE3, "datetime('now')")
|
|
| 389 |
("current_timestamp"), SqlVal::HIGH);
|
|
| 390 |
} |
|
| 391 | ||
| 377 | 392 |
SqlVal Cast(const char* type, const SqlId& a) {
|
| 378 | 393 |
return SqlFunc(type, a); |
| 379 | 394 |
} |
| uppsrc/Sql/Sqlexp.h (working copy) | ||
|---|---|---|
| 284 | 284 |
SqlVal LastDay(const SqlVal& date); |
| 285 | 285 |
SqlVal MonthsBetween(const SqlVal& date1, const SqlVal& date2); |
| 286 | 286 |
SqlVal NextDay(const SqlVal& date); |
| 287 |
SqlVal SqlCurrentDate(); |
|
| 288 |
SqlVal SqlCurrentTime(); |
|
| 289 |
SqlVal SqlCurrentTimestamp(); |
|
| 287 | 290 | |
| 288 | 291 |
SqlVal Cast(const char* type, const SqlId& a); |
| 289 | 292 | |