|
|
@ -670,7 +670,7 @@ async function _formulaQueryBuilder( |
|
|
|
} else if (pt.type === 'Identifier') { |
|
|
|
} else if (pt.type === 'Identifier') { |
|
|
|
const { builder } = await aliasToColumn?.[pt.name]?.(); |
|
|
|
const { builder } = await aliasToColumn?.[pt.name]?.(); |
|
|
|
if (typeof builder === 'function') { |
|
|
|
if (typeof builder === 'function') { |
|
|
|
return { builder: knex.raw(`??${colAlias}`, await builder(pt.fnName)) }; |
|
|
|
return { builder: knex.raw(`??${colAlias}`, builder(pt.fnName)) }; |
|
|
|
} |
|
|
|
} |
|
|
|
return { builder: knex.raw(`??${colAlias}`, [builder || pt.name]) }; |
|
|
|
return { builder: knex.raw(`??${colAlias}`, [builder || pt.name]) }; |
|
|
|
} else if (pt.type === 'BinaryExpression') { |
|
|
|
} else if (pt.type === 'BinaryExpression') { |
|
|
|