|
|
@ -8,7 +8,12 @@ import { |
|
|
|
UITypes, |
|
|
|
UITypes, |
|
|
|
} from 'nocodb-sdk'; |
|
|
|
} from 'nocodb-sdk'; |
|
|
|
import type { BaseModelSqlv2 } from '~/db/BaseModelSqlv2'; |
|
|
|
import type { BaseModelSqlv2 } from '~/db/BaseModelSqlv2'; |
|
|
|
import type { BarcodeColumn, QrCodeColumn, RollupColumn } from '~/models'; |
|
|
|
import type { |
|
|
|
|
|
|
|
BarcodeColumn, |
|
|
|
|
|
|
|
FormulaColumn, |
|
|
|
|
|
|
|
QrCodeColumn, |
|
|
|
|
|
|
|
RollupColumn, |
|
|
|
|
|
|
|
} from '~/models'; |
|
|
|
import { Column } from '~/models'; |
|
|
|
import { Column } from '~/models'; |
|
|
|
import { NcError } from '~/helpers/catchError'; |
|
|
|
import { NcError } from '~/helpers/catchError'; |
|
|
|
import genRollupSelectv2 from '~/db/genRollupSelectv2'; |
|
|
|
import genRollupSelectv2 from '~/db/genRollupSelectv2'; |
|
|
@ -151,9 +156,14 @@ export default async function applyAggregation({ |
|
|
|
break; |
|
|
|
break; |
|
|
|
|
|
|
|
|
|
|
|
case UITypes.Formula: |
|
|
|
case UITypes.Formula: |
|
|
|
column_name_query = ( |
|
|
|
const formula = await column.getColOptions<FormulaColumn>(context); |
|
|
|
await baseModelSqlv2.getSelectQueryBuilderForFormula(column) |
|
|
|
if (formula.error) { |
|
|
|
).builder; |
|
|
|
aggregation = CommonAggregations.None; |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
column_name_query = ( |
|
|
|
|
|
|
|
await baseModelSqlv2.getSelectQueryBuilderForFormula(column) |
|
|
|
|
|
|
|
).builder; |
|
|
|
|
|
|
|
} |
|
|
|
break; |
|
|
|
break; |
|
|
|
|
|
|
|
|
|
|
|
case UITypes.LinkToAnotherRecord: |
|
|
|
case UITypes.LinkToAnotherRecord: |
|
|
|