google.cloud.bigquery.query.ScalarQueryParameter#
Methods
|
Factory: construct parameter from JSON resource. |
|
Factory for positional paramater. |
Construct JSON API representation for the parameter. |
-
class
google.cloud.bigquery.query.
ScalarQueryParameter
(name, type_, value)[source]# Bases:
google.cloud.bigquery.query._AbstractQueryParameter
Named / positional query parameters for scalar values.
- Parameters
name (str or None) – Parameter name, used via
@foo
syntax. If None, the parameter can only be addressed via position (?
).type (str) – name of parameter type. One of ‘STRING’, ‘INT64’, ‘FLOAT64’, ‘NUMERIC’, ‘BOOL’, ‘TIMESTAMP’, ‘DATETIME’, or ‘DATE’.
value (str, int, float,
decimal.Decimal
, bool,datetime.datetime
, ordatetime.date
.) – the scalar parameter value.
-
classmethod
from_api_repr
(resource)[source]# Factory: construct parameter from JSON resource.
- Parameters
resource (dict) – JSON mapping of parameter
- Return type
- Returns
instance
-
classmethod
positional
(type_, value)[source]# Factory for positional paramater.
- Parameters
type (str) – name of parameter type. One of ‘STRING’, ‘INT64’, ‘FLOAT64’, ‘NUMERIC’, ‘BOOL’, ‘TIMESTAMP’, ‘DATETIME’, or ‘DATE’.
value (str, int, float,
decimal.Decimal
, bool,datetime.datetime
, ordatetime.date
.) – the scalar parameter value.
- Return type
- Returns
instance without name