SQL expression rewrite, Pagination, some frontend stuff

This commit is contained in:
2023-01-05 22:47:17 +01:00
parent 4bfd6754cf
commit 99bfd7e505
61 changed files with 1745 additions and 570 deletions

View File

@@ -2,6 +2,20 @@
namespace Core\Driver\SQL\Expression;
use Core\Driver\SQL\MySQL;
use Core\Driver\SQL\PostgreSQL;
use Core\Driver\SQL\SQL;
use Exception;
class CurrentTimeStamp extends Expression {
function getExpression(SQL $sql, array &$params): string {
if ($sql instanceof MySQL) {
return "NOW()";
} else if ($sql instanceof PostgreSQL) {
return "CURRENT_TIMESTAMP";
} else {
throw new Exception("CurrentTimeStamp Not implemented for driver type: " . get_class($sql));
}
}
}