Class ScalarQueryParameter

Named / positional query parameters for scalar values.

Inheritance

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

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

positional

positional(
    type_: Union[str, google.cloud.bigquery.query.ScalarQueryParameterType],
    value: Optional[
        Union[str, int, float, decimal.Decimal, bool, datetime.datetime, datetime.date]
    ],
)

Factory for positional paramater.

Parameters
NameDescription
type_

Name of parameter type. One of 'STRING', 'INT64', 'FLOAT64', 'NUMERIC', 'BIGNUMERIC', 'BOOL', 'TIMESTAMP', 'DATETIME', or 'DATE'.

value

The scalar parameter value.

Returns
TypeDescription
google.cloud.bigquery.query.ScalarQueryParameterInstance without name

to_api_repr

to_api_repr()

Construct JSON API representation for the parameter.

Returns
TypeDescription
DictJSON mapping