diff --git a/.github/workflows/release-docker.yml b/.github/workflows/release-docker.yml index 812617b6b3..bc7ebffff0 100644 --- a/.github/workflows/release-docker.yml +++ b/.github/workflows/release-docker.yml @@ -44,9 +44,6 @@ jobs: runs-on: ubuntu-latest env: working-directory: ./packages/nocodb - strategy: - matrix: - node-version: [16] steps: - name: Get Docker Repository id: get-docker-repository @@ -77,7 +74,7 @@ jobs: - name: Use Node.js ${{ matrix.node-version }} uses: actions/setup-node@v2 with: - node-version: ${{ matrix.node-version }} + node-version: 16.15.0 - name: upgrade packages for nightly build or pr build if: ${{ github.event.inputs.targetEnv == 'DEV' || inputs.targetEnv == 'DEV' }} diff --git a/.github/workflows/release-npm.yml b/.github/workflows/release-npm.yml index cc96ddf60c..f80cf156d9 100644 --- a/.github/workflows/release-npm.yml +++ b/.github/workflows/release-npm.yml @@ -35,20 +35,17 @@ jobs: runs-on: ubuntu-latest env: working-directory: ./packages/nocodb - strategy: - matrix: - node-version: [16] steps: - name: Checkout uses: actions/checkout@v2 with: fetch-depth: 0 ref: ${{ github.ref }} - - name: NPM Setup and Publish with ${{ matrix.node-version }} + - name: NPM Setup and Publish with 16.15.0 # Setup .npmrc file to publish to npm uses: actions/setup-node@v2 with: - node-version: ${{ matrix.node-version }} + node-version: 16.15.0 registry-url: 'https://registry.npmjs.org' - run: | targetEnv=${{ github.event.inputs.targetEnv || inputs.targetEnv }} targetVersion=${{ github.event.inputs.tag || inputs.tag }} node scripts/bumpNocodbSdkVersion.js && diff --git a/.github/workflows/update-sdk-path.yml b/.github/workflows/update-sdk-path.yml index 0e292aed0d..d6360f914d 100644 --- a/.github/workflows/update-sdk-path.yml +++ b/.github/workflows/update-sdk-path.yml @@ -8,9 +8,6 @@ on: jobs: release: runs-on: ubuntu-latest - strategy: - matrix: - node-version: [16] steps: - name: Checkout uses: actions/checkout@v2 diff --git a/packages/noco-docs/content/en/getting-started/installation.md b/packages/noco-docs/content/en/getting-started/installation.md index 24f71a5538..9fd3b52f7f 100644 --- a/packages/noco-docs/content/en/getting-started/installation.md +++ b/packages/noco-docs/content/en/getting-started/installation.md @@ -180,7 +180,7 @@ It is mandatory to configure `NC_DB` environment variables for production usecas | NC_AUTH_JWT_SECRET | Yes | JWT secret used for auth and storing other secrets | A Random secret will be generated | | | PORT | No | For setting app running port | `8080` | | | DB_QUERY_LIMIT_DEFAULT | No | Default pagination limit | 25 | | -| DB_QUERY_LIMIT_MAX | No | Maximum allowed pagination limit | 100 | | +| DB_QUERY_LIMIT_MAX | No | Maximum allowed pagination limit | 1000 | | | DB_QUERY_LIMIT_MIN | No | Minimum allowed pagination limit | 1 | | | NC_TOOL_DIR | No | App directory to keep metadata and app related files | Defaults to current working directory. In docker maps to `/usr/app/data/` for mounting volume. | | | NC_PUBLIC_URL | Yes | Used for sending Email invitations | Best guess from http request params | | diff --git a/packages/nocodb/src/lib/db/sql-data-mapper/lib/sql/BaseModelSqlv2.ts b/packages/nocodb/src/lib/db/sql-data-mapper/lib/sql/BaseModelSqlv2.ts index df786b6ec3..547d112cf9 100644 --- a/packages/nocodb/src/lib/db/sql-data-mapper/lib/sql/BaseModelSqlv2.ts +++ b/packages/nocodb/src/lib/db/sql-data-mapper/lib/sql/BaseModelSqlv2.ts @@ -70,9 +70,9 @@ class BaseModelSqlv2 { private _columns = {}; private config: any = { - limitDefault: 25, - limitMin: 1, - limitMax: 1000 + limitDefault: Math.max(+process.env.DB_QUERY_LIMIT_DEFAULT || 25, 1), + limitMin: Math.max(+process.env.DB_QUERY_LIMIT_MIN || 1, 1), + limitMax: Math.max(+process.env.DB_QUERY_LIMIT_MAX || 1000, 1) }; constructor({ @@ -1370,6 +1370,7 @@ class BaseModelSqlv2 { get isPg() { return this.clientType === 'pg'; } + get isMySQL() { return this.clientType === 'mysql2' || this.clientType === 'mysql'; } diff --git a/packages/nocodb/src/lib/meta/api/swagger/helpers/templates/params.ts b/packages/nocodb/src/lib/meta/api/swagger/helpers/templates/params.ts index 0e010fd81b..f467d4aa58 100644 --- a/packages/nocodb/src/lib/meta/api/swagger/helpers/templates/params.ts +++ b/packages/nocodb/src/lib/meta/api/swagger/helpers/templates/params.ts @@ -59,7 +59,7 @@ export const limitParam = { in: 'query', name: 'limit', description: - 'The `limit` parameter used for pagination, the response collection size depends on limit value and default value is `25`. Maximum value is `1000`.', + 'The `limit` parameter used for pagination, the response collection size depends on limit value with default value `25` and maximum value `1000`, which can be overridden by environment variables `DB_QUERY_LIMIT_DEFAULT` and `DB_QUERY_LIMIT_MAX` respectively.', example: 25 }; export const offsetParam = {