Fix range to be based on current time (#13701)

* Fix range to be based on current time

* Parse using localtime for fields without timezone data on SQLite

* Add tests

* Parse test response to int

* Refactor to options object

* Read timestamps as UTC for Oracle

Co-authored-by: Rijk van Zanten <rijkvanzanten@me.com>
This commit is contained in:
ian
2022-06-08 19:12:42 +08:00
committed by GitHub
parent 887601520b
commit 8f131b5156
8 changed files with 154 additions and 45 deletions

View File

@@ -37,7 +37,7 @@ export function getColumn(
throw new InvalidQueryException(`Invalid function specified "${functionName}"`);
}
const result = fn[functionName as keyof typeof fn](table, columnName) as Knex.Raw;
const result = fn[functionName as keyof typeof fn](table, columnName, { type }) as Knex.Raw;
if (alias) {
return knex.raw(result + ' AS ??', [alias]);