浏览代码

feat(minor): Add DateFormat function util for qb

version-14
Gavin D'souza 3 年前
父节点
当前提交
71d3f1c0d1
共有 1 个文件被更改,包括 4 次插入0 次删除
  1. +4
    -0
      frappe/query_builder/functions.py

+ 4
- 0
frappe/query_builder/functions.py 查看文件

@@ -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):


正在加载...
取消
保存