Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 7 additions & 19 deletions handwritten/bigquery/src/bigquery.ts
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,7 @@
};

export type QueryResultsResponse =
| bigquery.IGetQueryResultsResponse
| bigquery.IQueryResponse;
bigquery.IGetQueryResultsResponse | bigquery.IQueryResponse;

export type QueryRowsResponse = PagedResponse<
RowMetadata,
Expand Down Expand Up @@ -135,16 +134,10 @@

export type QueryParamTypeStruct = {
[type: string]:
| string
| string[]
| QueryParamTypeStruct
| QueryParamTypeStruct[];
string | string[] | QueryParamTypeStruct | QueryParamTypeStruct[];
};
export type QueryParamTypes =
| string[]
| string[][]
| QueryParamTypeStruct
| QueryParamTypeStruct[];
string[] | string[][] | QueryParamTypeStruct | QueryParamTypeStruct[];

export type QueryOptions = QueryResultsOptions;
export type QueryStreamOptions = {
Expand Down Expand Up @@ -377,17 +370,17 @@
private _universeDomain: string;
private _defaultJobCreationMode: JobCreationMode;

createQueryStream(options?: Query | string): ResourceStream<RowMetadata> {

Check warning on line 373 in handwritten/bigquery/src/bigquery.ts

View workflow job for this annotation

GitHub Actions / lint

'options' is defined but never used
// placeholder body, overwritten in constructor
return new ResourceStream<RowMetadata>({}, () => {});
}

getDatasetsStream(options?: GetDatasetsOptions): ResourceStream<Dataset> {

Check warning on line 378 in handwritten/bigquery/src/bigquery.ts

View workflow job for this annotation

GitHub Actions / lint

'options' is defined but never used
// placeholder body, overwritten in constructor
return new ResourceStream<Dataset>({}, () => {});
}

getJobsStream(options?: GetJobsOptions): ResourceStream<Job> {

Check warning on line 383 in handwritten/bigquery/src/bigquery.ts

View workflow job for this annotation

GitHub Actions / lint

'options' is defined but never used
// placeholder body, overwritten in constructor
return new ResourceStream<Job>({}, () => {});
}
Expand Down Expand Up @@ -598,8 +591,7 @@
selectedFields?: string[];
parseJSON?: boolean;
listParams?:
| bigquery.tabledata.IListParams
| bigquery.jobs.IGetQueryResultsParams;
bigquery.tabledata.IListParams | bigquery.jobs.IGetQueryResultsParams;
},
) {
// deep copy schema fields to avoid mutation
Expand Down Expand Up @@ -1607,7 +1599,7 @@
const parameterMode = isArray(params) ? 'positional' : 'named';
const queryParameters: bigquery.IQueryParameter[] = [];
if (parameterMode === 'named') {
const namedParams = params as {[param: string]: any};

Check warning on line 1602 in handwritten/bigquery/src/bigquery.ts

View workflow job for this annotation

GitHub Actions / lint

Unexpected any. Specify a different type
for (const namedParameter of Object.getOwnPropertyNames(namedParams)) {
const value = namedParams[namedParameter];
let queryParameter;
Expand Down Expand Up @@ -2208,9 +2200,7 @@
query(
query: string | Query,
optionsOrCallback?:
| QueryOptions
| SimpleQueryRowsCallback
| QueryRowsCallback,
QueryOptions | SimpleQueryRowsCallback | QueryRowsCallback,
cb?: SimpleQueryRowsCallback | QueryRowsCallback,
): void | Promise<SimpleQueryRowsResponse> | Promise<QueryRowsResponse> {
let options =
Expand Down Expand Up @@ -2256,7 +2246,7 @@

options = extend({job}, queryOpts, options);
if (res && res.jobComplete) {
let rows: any = [];

Check warning on line 2249 in handwritten/bigquery/src/bigquery.ts

View workflow job for this annotation

GitHub Actions / lint

Unexpected any. Specify a different type
if (res.schema && res.rows) {
try {
/*
Expand Down Expand Up @@ -2523,8 +2513,7 @@
selectedFields?: string[];
parseJSON?: boolean;
listParams?:
| bigquery.tabledata.IListParams
| bigquery.jobs.IGetQueryResultsParams;
bigquery.tabledata.IListParams | bigquery.jobs.IGetQueryResultsParams;
},
) {
if (value === null) {
Expand Down Expand Up @@ -2753,8 +2742,7 @@
value: string,
elementType: string,
listParams?:
| bigquery.tabledata.IListParams
| bigquery.jobs.IGetQueryResultsParams,
bigquery.tabledata.IListParams | bigquery.jobs.IGetQueryResultsParams,
): BigQueryRange {
const [start, end] = BigQueryRange.fromStringValue_(value);
const convertRangeSchemaValue = (value: string) => {
Expand Down
4 changes: 2 additions & 2 deletions handwritten/bigquery/src/types.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
// limitations under the License.

/**
* Discovery Revision: 20260731
* Discovery Revision: 20260811
*/

/**
Expand Down Expand Up @@ -2009,7 +2009,7 @@ declare namespace bigquery {
*/
errorStats?: IGenAiErrorStats;
/**
* Function level stats for GenAi Functions. See https://docs.cloud.google.com/bigquery/docs/generative-ai-overview
* Function level stats for GenAI Functions. For more information, see [Generative AI overview](https://docs.cloud.google.com/bigquery/docs/generative-ai-overview).
*/
functionStats?: Array<IGenAiFunctionStats>;
};
Expand Down
Loading