Class ArrayQueryParameter (3.20.1)

ArrayQueryParameter(name, array_type, values)

Named / positional query parameters for array values.

Parameters

NameDescription
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.

Methods

from_api_repr

from_api_repr(resource: dict) -> google.cloud.bigquery.query.ArrayQueryParameter

Factory: construct parameter from JSON resource.

Parameter
NameDescription
resource Dict

JSON mapping of parameter

Returns
TypeDescription
google.cloud.bigquery.query.ArrayQueryParameterInstance

positional

positional(
    array_type: str, values: list
) -> google.cloud.bigquery.query.ArrayQueryParameter

Factory for positional parameters.

Parameters
NameDescription
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
TypeDescription
google.cloud.bigquery.query.ArrayQueryParameterInstance without name

to_api_repr

to_api_repr() -> dict

Construct JSON API representation for the parameter.

Returns
TypeDescription
DictJSON mapping