Browse Source

fix(nc-gui): data apis v2 skip pagination

pull/7611/head
DarkPhoenix2704 10 months ago
parent
commit
01ebd0f891
  1. 1
      packages/nocodb/src/controllers/data-table.controller.ts
  2. 4
      packages/nocodb/src/services/data-table.service.ts

1
packages/nocodb/src/controllers/data-table.controller.ts

@ -38,6 +38,7 @@ export class DataTableController {
query: req.query,
modelId: modelId,
viewId: viewId,
ignorePagination: req.headers?.['xc-ignore-pagination'] === 'true',
});
const elapsedSeconds = parseHrtimeToMilliSeconds(process.hrtime(startTime));
res.setHeader('xc-db-response', elapsedSeconds);

4
packages/nocodb/src/services/data-table.service.ts

@ -3,11 +3,11 @@ import { isLinksOrLTAR, RelationTypes } from 'nocodb-sdk';
import { nocoExecute } from 'nc-help';
import { validatePayload } from 'src/helpers';
import type { LinkToAnotherRecordColumn } from '~/models';
import { Column, Model, Source, View } from '~/models';
import { DatasService } from '~/services/datas.service';
import { NcError } from '~/helpers/catchError';
import getAst from '~/helpers/getAst';
import { PagedResponseImpl } from '~/helpers/PagedResponse';
import { Column, Model, Source, View } from '~/models';
import NcConnectionMgrv2 from '~/utils/common/NcConnectionMgrv2';
@Injectable()
@ -19,6 +19,7 @@ export class DataTableService {
modelId: string;
query: any;
viewId?: string;
ignorePagination?: boolean;
}) {
const { model, view } = await this.getModelAndView(param);
@ -27,6 +28,7 @@ export class DataTableService {
view,
query: param.query,
throwErrorIfInvalidParams: true,
ignorePagination: param.ignorePagination,
});
}

Loading…
Cancel
Save