feat(minor): Add DateFormat function util for qb

This commit is contained in:
Gavin D'souza 2022-03-31 13:39:06 +05:30
parent 10e4ed7c1e
commit 71d3f1c0d1

View file

@ -43,6 +43,10 @@ CombineDatetime = ImportMapper(
}
)
DateFormat = ImportMapper({
db_type_is.MARIADB: CustomFunction("DATE_FORMAT", ["date", "format"]),
db_type_is.POSTGRES: ToChar,
})
class Cast_(Function):
def __init__(self, value, as_type, alias=None):