Class ArrayQueryParameter (2.33.0)

ArrayQueryParameter(name, array_type, values)

Named / positional query parameters for array values.

Parameters

Name Description
name Optional[str]

Parameter name, used via @foo syntax. If None, the parameter can only be addressed via position (?).

array_type Union[str, ScalarQueryParameterType, StructQueryParameterType]

The type of array elements. If given as a string, it must be one of 'STRING', 'INT64', 'FLOAT64', 'NUMERIC', 'BIGNUMERIC', 'BOOL', 'TIMESTAMP', 'DATE', or 'STRUCT'/'RECORD'. If the type is 'STRUCT'/'RECORD' and values is empty, the exact item type cannot be deduced, thus a StructQueryParameterType instance needs to be passed in.

values List[appropriate type]

The parameter array values.

Inheritance

builtins.object > google.cloud.bigquery.query._AbstractQueryParameter > ArrayQueryParameter

Methods

from_api_repr

from_api_repr(resource: dict)

Factory: construct parameter from JSON resource.

Parameter
Name Description
resource Dict

JSON mapping of parameter

Returns
Type Description
google.cloud.bigquery.query.ArrayQueryParameter Instance

positional

positional(array_type: str, values: list)

Factory for positional parameters.

Parameters
Name Description
array_type Union[str, ScalarQueryParameterType, StructQueryParameterType]

The type of array elements. If given as a string, it must be one of 'STRING', 'INT64', 'FLOAT64', 'NUMERIC', 'BIGNUMERIC', 'BOOL', 'TIMESTAMP', 'DATE', or 'STRUCT'/'RECORD'. If the type is 'STRUCT'/'RECORD' and values is empty, the exact item type cannot be deduced, thus a StructQueryParameterType instance needs to be passed in.

values List[appropriate type]

The parameter array values.

Returns
Type Description
google.cloud.bigquery.query.ArrayQueryParameter Instance without name

to_api_repr

to_api_repr()

Construct JSON API representation for the parameter.

Returns
Type Description
Dict JSON mapping

Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025年10月30日 UTC.