diff --git a/packages/nocodb/src/controllers/data-table.controller.ts b/packages/nocodb/src/controllers/data-table.controller.ts index 507e14d6e8..9a4e16d0f8 100644 --- a/packages/nocodb/src/controllers/data-table.controller.ts +++ b/packages/nocodb/src/controllers/data-table.controller.ts @@ -151,7 +151,8 @@ export class DataTableController { @Query('viewId') viewId: string, @Param('columnId') columnId: string, @Param('rowId') rowId: string, - @Body() refRowIds: string | string[] | number | number[] | Record, + @Body() + refRowIds: string | string[] | number | number[] | Record, ) { return await this.dataTableService.nestedLink({ modelId, @@ -172,7 +173,8 @@ export class DataTableController { @Query('viewId') viewId: string, @Param('columnId') columnId: string, @Param('rowId') rowId: string, - @Body() refRowIds: string | string[] | number | number[] | Record, + @Body() + refRowIds: string | string[] | number | number[] | Record, ) { return await this.dataTableService.nestedUnlink({ modelId, diff --git a/packages/nocodb/src/db/BaseModelSqlv2.ts b/packages/nocodb/src/db/BaseModelSqlv2.ts index 0a1afe6b0b..f4ba33ebd5 100644 --- a/packages/nocodb/src/db/BaseModelSqlv2.ts +++ b/packages/nocodb/src/db/BaseModelSqlv2.ts @@ -155,7 +155,7 @@ class BaseModelSqlv2 { model: this.model, view: ignoreView ? null : this.viewId && (await View.get(this.viewId)), getHiddenColumn, - throwErrorIfInvalidParams + throwErrorIfInvalidParams, }); await this.selectObject({ @@ -381,7 +381,11 @@ class BaseModelSqlv2 { // qb.xwhere(where, await this.model.getAliasColMapping()); const aliasColObjMap = await this.model.getAliasColObjMap(); - const filterObj = extractFilterFromXwhere(where, aliasColObjMap,throwErrorIfInvalidParams); + const filterObj = extractFilterFromXwhere( + where, + aliasColObjMap, + throwErrorIfInvalidParams, + ); if (!ignoreViewFilterAndSort && this.viewId) { await conditionV2( @@ -406,7 +410,7 @@ class BaseModelSqlv2 { ], qb, undefined, - throwErrorIfInvalidParams + throwErrorIfInvalidParams, ); } else { await conditionV2( @@ -426,7 +430,7 @@ class BaseModelSqlv2 { ], qb, undefined, - throwErrorIfInvalidParams + throwErrorIfInvalidParams, ); } diff --git a/packages/nocodb/src/db/conditionV2.ts b/packages/nocodb/src/db/conditionV2.ts index ed0efef062..664741dcc4 100644 --- a/packages/nocodb/src/db/conditionV2.ts +++ b/packages/nocodb/src/db/conditionV2.ts @@ -2,13 +2,13 @@ import { isNumericCol, RelationTypes, UITypes } from 'nocodb-sdk'; import dayjs from 'dayjs'; // import customParseFormat from 'dayjs/plugin/customParseFormat.js'; import type { BaseModelSqlv2 } from '~/db/BaseModelSqlv2'; -import { NcError } from '~/helpers/catchError' import type LinkToAnotherRecordColumn from '~/models/LinkToAnotherRecordColumn'; import type { Knex } from 'knex'; import type Column from '~/models/Column'; import type LookupColumn from '~/models/LookupColumn'; import type RollupColumn from '~/models/RollupColumn'; import type FormulaColumn from '~/models/FormulaColumn'; +import { NcError } from '~/helpers/catchError'; import formulaQueryBuilderv2 from '~/db/formulav2/formulaQueryBuilderv2'; import genRollupSelectv2 from '~/db/genRollupSelectv2'; import { sanitize } from '~/helpers/sqlSanitize'; @@ -115,7 +115,9 @@ const parseConditionV2 = async ( const column = await filter.getColumn(); if (!column) { if (throwErrorIfInvalid) { - NcError.unprocessableEntity(`Invalid column id '${filter.fk_column_id}' in filter`); + NcError.unprocessableEntity( + `Invalid column id '${filter.fk_column_id}' in filter`, + ); } return; } diff --git a/packages/nocodb/src/services/datas.service.ts b/packages/nocodb/src/services/datas.service.ts index 93350bfae7..08e5ac60f1 100644 --- a/packages/nocodb/src/services/datas.service.ts +++ b/packages/nocodb/src/services/datas.service.ts @@ -147,7 +147,12 @@ export class DatasService { dbDriver: await NcConnectionMgrv2.get(source), })); - const { ast, dependencyFields } = await getAst({ model, query, view, throwErrorIfInvalidParams: param.throwErrorIfInvalidParams }); + const { ast, dependencyFields } = await getAst({ + model, + query, + view, + throwErrorIfInvalidParams: param.throwErrorIfInvalidParams, + }); const listArgs: any = dependencyFields; try {