feat: Added Timestamp support
This commit is contained in:
parent
88faad6409
commit
c97562b736
1 changed files with 9 additions and 0 deletions
|
|
@ -20,6 +20,14 @@ class Locate(Function):
|
|||
super().__init__("LOCATE", *terms, **kwargs)
|
||||
|
||||
|
||||
class Timestamp(Function):
|
||||
def __init__(self, term: str, time=None, alias=None):
|
||||
if time:
|
||||
super().__init__("TIMESTAMP", term, time, alias=alias)
|
||||
else:
|
||||
super().__init__("TIMESTAMP", term, alias=alias)
|
||||
|
||||
|
||||
GroupConcat = ImportMapper({db_type_is.MARIADB: GROUP_CONCAT, db_type_is.POSTGRES: STRING_AGG})
|
||||
|
||||
Match = ImportMapper({db_type_is.MARIADB: MATCH, db_type_is.POSTGRES: TO_TSVECTOR})
|
||||
|
|
@ -96,6 +104,7 @@ class SqlFunctions(Enum):
|
|||
Max = "max"
|
||||
Min = "min"
|
||||
Abs = "abs"
|
||||
Timestamp = "timestamp"
|
||||
|
||||
|
||||
def _max(dt, fieldname, filters=None, **kwargs):
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue