|
|
|
@ -20,6 +20,7 @@ import { CacheGetType, CacheScope } from '~/utils/globals';
|
|
|
|
|
import { convertDateFormatForConcat } from '~/helpers/formulaFnHelper'; |
|
|
|
|
import FormulaColumn from '~/models/FormulaColumn'; |
|
|
|
|
import { Base, BaseUser } from '~/models'; |
|
|
|
|
import { getRefColumnIfAlias } from '~/helpers'; |
|
|
|
|
|
|
|
|
|
const logger = new Logger('FormulaQueryBuilderv2'); |
|
|
|
|
|
|
|
|
@ -637,7 +638,12 @@ async function _formulaQueryBuilder(
|
|
|
|
|
}; |
|
|
|
|
}; |
|
|
|
|
break; |
|
|
|
|
case UITypes.CreateTime: |
|
|
|
|
case UITypes.LastModifiedTime: |
|
|
|
|
case UITypes.DateTime: |
|
|
|
|
{ |
|
|
|
|
const col = await getRefColumnIfAlias(col); |
|
|
|
|
|
|
|
|
|
if (knex.clientType().startsWith('mysql')) { |
|
|
|
|
aliasToColumn[col.id] = async (): Promise<any> => { |
|
|
|
|
return { |
|
|
|
@ -681,6 +687,7 @@ async function _formulaQueryBuilder(
|
|
|
|
|
aliasToColumn[col.id] = () => |
|
|
|
|
Promise.resolve({ builder: col.column_name }); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
break; |
|
|
|
|
case UITypes.User: |
|
|
|
|
{ |
|
|
|
|