Class ArrayQueryParameter (2.26.0)

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.

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
NameDescription
resource Dict

JSON mapping of parameter

Returns
TypeDescription
google.cloud.bigquery.query.ArrayQueryParameterInstance

positional

positional(array_type: str, values: list)

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()

Construct JSON API representation for the parameter.

Returns
TypeDescription
DictJSON mapping

__init__

__init__(name, array_type, values)

Initialize self. See help(type(self)) for accurate signature.

ArrayQueryParameter

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.