Skip to content

Commit

Permalink
feat: paging changes for bigquery (#1661)
Browse files Browse the repository at this point in the history
* debug statements

* WIP pagination

* WIP

* WIP - partial pagination work

* WIP - pageResponseType compiles

* WIP

* WIP success pagination maxResults

* partial cleanup

* remove unnecessary step

* WIP - some tempalte changes

* more changes

* lint

* update baselines

* run baselines

* update esm templates

* add bq cjs baseline

* add bigquery esm baselines

* change package.json baseline to symlink

* change esm package.json baseline to symlink

* add bq to ci.yml

* add debug line

* more debugging

* remove debug

* WIP: baselines

* update baselines

* add bq protos

* run baseline job

* run baseline job

* add reviewer suggestion to protos.ts, update baselines

* make the maxResultsParameter undefined for all APIS that aren't BQ

* update samples comments

* fix lint

* remove todo

* remove todo

* address reviewer suggestions

* address reviewer suggestion

* fix lint
  • Loading branch information
leahecole authored Nov 8, 2024
1 parent 0d5ca4a commit 24f6ad1
Show file tree
Hide file tree
Showing 303 changed files with 64,380 additions and 33 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ jobs:
strategy:
matrix:
node-version: [14.x]
lib-name: [showcase, kms, translate, monitoring, dlp, texttospeech, showcase-legacy, compute, logging]
lib-name: [showcase, kms, translate, monitoring, dlp, texttospeech, showcase-legacy, compute, logging, bigquery-v2]
steps:
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
Expand Down Expand Up @@ -110,7 +110,7 @@ jobs:
strategy:
matrix:
node-version: [14.x]
lib-name: [showcase, kms, translate, monitoring, dlp, texttospeech, showcase-legacy, compute, logging]
lib-name: [showcase, kms, translate, monitoring, dlp, texttospeech, showcase-legacy, compute, logging, bigquery-v2]
steps:
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
Expand Down
19 changes: 19 additions & 0 deletions baselines/bigquery-v2-esm/.babelrc.json.baseline
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"presets": [
"@babel/preset-typescript",
"@babel/env"
],
"plugins": [
[
"replace-import-extension",
{
"extMapping": {
".js": ".cjs"
}
}
],
"./node_modules/gapic-tools/build/src/replaceESMMockingLib.js",
"./node_modules/gapic-tools/build/src/replaceImportMetaUrl.js",
"./node_modules/gapic-tools/build/src/toggleESMFlagVariable.js"
]
}
11 changes: 11 additions & 0 deletions baselines/bigquery-v2-esm/.eslintignore.baseline
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
**/node_modules
**/.coverage
build/
docs/
protos/
system-test/
samples/
esm/src/**/*.d.ts
esm/test/**/*.d.ts
esm/system-test/**/*.d.ts
esm/system-test/fixtures/sample/src/*.ts
3 changes: 3 additions & 0 deletions baselines/bigquery-v2-esm/.eslintrc.json.baseline
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"extends": "./node_modules/gts"
}
15 changes: 15 additions & 0 deletions baselines/bigquery-v2-esm/.gitignore.baseline
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
**/*.log
**/node_modules
/.coverage
/coverage
/.nyc_output
/docs/
/out/
/build/
system-test/secrets.js
system-test/*key.json
*.lock
.DS_Store
package-lock.json
__pycache__
esm/**/*.d.ts
54 changes: 54 additions & 0 deletions baselines/bigquery-v2-esm/.jsdoc.cjs.baseline
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
// Copyright 2024 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
// ** This file is automatically generated by gapic-generator-typescript. **
// ** https://github.com/googleapis/gapic-generator-typescript **
// ** All changes to this file may be overwritten. **


module.exports = {
opts: {
readme: './README.md',
package: './package.json',
template: './node_modules/jsdoc-fresh',
recurse: true,
verbose: true,
destination: './docs/'
},
plugins: [
'plugins/markdown',
'jsdoc-region-tag'
],
source: {
excludePattern: '(^|\\/|\\\\)[._]',
include: [
'build/src',
'protos'
],
includePattern: '\\.js$'
},
templates: {
copyright: 'Copyright 2024 Google LLC',
includeDate: false,
sourceFiles: false,
systemName: 'bigquery',
theme: 'lumen',
default: {
outputSourceFiles: false
}
},
markdown: {
idInHeadings: true
}
};
33 changes: 33 additions & 0 deletions baselines/bigquery-v2-esm/.mocharc.cjs.baseline
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
// Copyright 2024 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
// ** This file is automatically generated by gapic-generator-typescript. **
// ** https://github.com/googleapis/gapic-generator-typescript **
// ** All changes to this file may be overwritten. **

const config = {
"enable-source-maps": true,
"throw-deprecation": true,
"timeout": 10000
}
if (process.env.MOCHA_THROW_DEPRECATION === 'false') {
delete config['throw-deprecation'];
}
if (process.env.MOCHA_REPORTER) {
config.reporter = process.env.MOCHA_REPORTER;
}
if (process.env.MOCHA_REPORTER_OUTPUT) {
config['reporter-option'] = `output=${process.env.MOCHA_REPORTER_OUTPUT}`;
}
module.exports = config
22 changes: 22 additions & 0 deletions baselines/bigquery-v2-esm/.prettierrc.cjs.baseline
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
// Copyright 2024 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
// ** This file is automatically generated by gapic-generator-typescript. **
// ** https://github.com/googleapis/gapic-generator-typescript **
// ** All changes to this file may be overwritten. **


module.exports = {
...require('gts/.prettierrc.json')
}
1 change: 1 addition & 0 deletions baselines/bigquery-v2-esm/README.md.baseline
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Bigquery: Nodejs Client
38 changes: 38 additions & 0 deletions baselines/bigquery-v2-esm/esm/src/index.ts.baseline
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
// Copyright 2024 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
// ** This file is automatically generated by gapic-generator-typescript. **
// ** https://github.com/googleapis/gapic-generator-typescript **
// ** All changes to this file may be overwritten. **

import * as v2 from './v2/index.js';
const DatasetServiceClient = v2.DatasetServiceClient;
type DatasetServiceClient = v2.DatasetServiceClient;
const JobServiceClient = v2.JobServiceClient;
type JobServiceClient = v2.JobServiceClient;
const ModelServiceClient = v2.ModelServiceClient;
type ModelServiceClient = v2.ModelServiceClient;
const ProjectServiceClient = v2.ProjectServiceClient;
type ProjectServiceClient = v2.ProjectServiceClient;
const RoutineServiceClient = v2.RoutineServiceClient;
type RoutineServiceClient = v2.RoutineServiceClient;
const RowAccessPolicyServiceClient = v2.RowAccessPolicyServiceClient;
type RowAccessPolicyServiceClient = v2.RowAccessPolicyServiceClient;
const TableServiceClient = v2.TableServiceClient;
type TableServiceClient = v2.TableServiceClient;
export {v2, DatasetServiceClient, JobServiceClient, ModelServiceClient, ProjectServiceClient, RoutineServiceClient, RowAccessPolicyServiceClient, TableServiceClient};
export default {v2, DatasetServiceClient, JobServiceClient, ModelServiceClient, ProjectServiceClient, RoutineServiceClient, RowAccessPolicyServiceClient, TableServiceClient};
// @ts-ignore
import * as protos from '../../protos/protos.js';
export {protos}
20 changes: 20 additions & 0 deletions baselines/bigquery-v2-esm/esm/src/json-helper.cjs.baseline
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
// Copyright 2024 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

/* eslint-disable node/no-missing-require */
function getJSON(path) {
return require(path);
}

exports.getJSON = getJSON;
Loading

0 comments on commit 24f6ad1

Please sign in to comment.