瀏覽代碼

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


Loading…
取消
儲存