View source on GitHub |
An immutable class that contains all options for running a query.
Inherits From: FetchOptions
, Configuration
, BaseConfiguration
, expected_type
google.appengine.datastore.datastore_query.QueryOptions(
config=None, **kwargs
)
This class contains options that control execution process (deadline, batch_size, read_policy, etc) and what part of the query results are returned (keys_only, projection, offset, limit, etc) Options that control the contents of the query results are specified on the datastore_query.Query directly.
This class reserves the right to define configuration options of any name except those that start with 'user'. External subclasses should only define function or variables with names that start with in 'user'.
Options are set by passing keyword arguments to the constructor corresponding to the configuration options defined below and in FetchOptions and datastore_rpc.Configuration.
This object can be used as the default config for a datastore_rpc.Connection but in that case some options will be ignored, see below for details.
Args | |
---|---|
config
|
Optional base configuration providing default values for parameters not specified in the keyword arguments. |
**kwargs
|
Configuration options to store on this object. |
Methods
batch_size
batch_size(
*args
)
A descriptor for a Configuration option.
This class is used to create a configuration option on a class that inherits from BaseConfiguration. A validator function decorated with this class will be converted to a read-only descriptor and BaseConfiguration will implement constructor and merging logic for that configuration option. A validator function takes a single non-None value to validate and either throws an exception or returns that value (or an equivalent value). A validator is called once at construction time, but only if a non-None value for the configuration option is specified the constructor's keyword arguments.
deadline
deadline(
*args
)
A descriptor for a Configuration option.
This class is used to create a configuration option on a class that inherits from BaseConfiguration. A validator function decorated with this class will be converted to a read-only descriptor and BaseConfiguration will implement constructor and merging logic for that configuration option. A validator function takes a single non-None value to validate and either throws an exception or returns that value (or an equivalent value). A validator is called once at construction time, but only if a non-None value for the configuration option is specified the constructor's keyword arguments.
end_cursor
end_cursor(
*args
)
A descriptor for a Configuration option.
This class is used to create a configuration option on a class that inherits from BaseConfiguration. A validator function decorated with this class will be converted to a read-only descriptor and BaseConfiguration will implement constructor and merging logic for that configuration option. A validator function takes a single non-None value to validate and either throws an exception or returns that value (or an equivalent value). A validator is called once at construction time, but only if a non-None value for the configuration option is specified the constructor's keyword arguments.
force_writes
force_writes(
*args
)
A descriptor for a Configuration option.
This class is used to create a configuration option on a class that inherits from BaseConfiguration. A validator function decorated with this class will be converted to a read-only descriptor and BaseConfiguration will implement constructor and merging logic for that configuration option. A validator function takes a single non-None value to validate and either throws an exception or returns that value (or an equivalent value). A validator is called once at construction time, but only if a non-None value for the configuration option is specified the constructor's keyword arguments.
hint
hint(
*args
)
A descriptor for a Configuration option.
This class is used to create a configuration option on a class that inherits from BaseConfiguration. A validator function decorated with this class will be converted to a read-only descriptor and BaseConfiguration will implement constructor and merging logic for that configuration option. A validator function takes a single non-None value to validate and either throws an exception or returns that value (or an equivalent value). A validator is called once at construction time, but only if a non-None value for the configuration option is specified the constructor's keyword arguments.
is_configuration
@classmethod
is_configuration( obj )
True if configuration obj handles all options of this class.
Use this method rather than isinstance(obj, cls) to test if a configuration object handles the options of cls (is_configuration is handled specially for results of merge which may handle the options of unrelated configuration classes).
Args | |
---|---|
obj
|
the object to test. |
keys_only
keys_only(
*args
)
A descriptor for a Configuration option.
This class is used to create a configuration option on a class that inherits from BaseConfiguration. A validator function decorated with this class will be converted to a read-only descriptor and BaseConfiguration will implement constructor and merging logic for that configuration option. A validator function takes a single non-None value to validate and either throws an exception or returns that value (or an equivalent value). A validator is called once at construction time, but only if a non-None value for the configuration option is specified the constructor's keyword arguments.
limit
limit(
*args
)
A descriptor for a Configuration option.
This class is used to create a configuration option on a class that inherits from BaseConfiguration. A validator function decorated with this class will be converted to a read-only descriptor and BaseConfiguration will implement constructor and merging logic for that configuration option. A validator function takes a single non-None value to validate and either throws an exception or returns that value (or an equivalent value). A validator is called once at construction time, but only if a non-None value for the configuration option is specified the constructor's keyword arguments.
max_allocate_ids_keys
max_allocate_ids_keys(
*args
)
A descriptor for a Configuration option.
This class is used to create a configuration option on a class that inherits from BaseConfiguration. A validator function decorated with this class will be converted to a read-only descriptor and BaseConfiguration will implement constructor and merging logic for that configuration option. A validator function takes a single non-None value to validate and either throws an exception or returns that value (or an equivalent value). A validator is called once at construction time, but only if a non-None value for the configuration option is specified the constructor's keyword arguments.
max_delete_keys
max_delete_keys(
*args
)
A descriptor for a Configuration option.
This class is used to create a configuration option on a class that inherits from BaseConfiguration. A validator function decorated with this class will be converted to a read-only descriptor and BaseConfiguration will implement constructor and merging logic for that configuration option. A validator function takes a single non-None value to validate and either throws an exception or returns that value (or an equivalent value). A validator is called once at construction time, but only if a non-None value for the configuration option is specified the constructor's keyword arguments.
max_entity_groups_per_rpc
max_entity_groups_per_rpc(
*args
)
A descriptor for a Configuration option.
This class is used to create a configuration option on a class that inherits from BaseConfiguration. A validator function decorated with this class will be converted to a read-only descriptor and BaseConfiguration will implement constructor and merging logic for that configuration option. A validator function takes a single non-None value to validate and either throws an exception or returns that value (or an equivalent value). A validator is called once at construction time, but only if a non-None value for the configuration option is specified the constructor's keyword arguments.
max_get_keys
max_get_keys(
*args
)
A descriptor for a Configuration option.
This class is used to create a configuration option on a class that inherits from BaseConfiguration. A validator function decorated with this class will be converted to a read-only descriptor and BaseConfiguration will implement constructor and merging logic for that configuration option. A validator function takes a single non-None value to validate and either throws an exception or returns that value (or an equivalent value). A validator is called once at construction time, but only if a non-None value for the configuration option is specified the constructor's keyword arguments.
max_put_entities
max_put_entities(
*args
)
A descriptor for a Configuration option.
This class is used to create a configuration option on a class that inherits from BaseConfiguration. A validator function decorated with this class will be converted to a read-only descriptor and BaseConfiguration will implement constructor and merging logic for that configuration option. A validator function takes a single non-None value to validate and either throws an exception or returns that value (or an equivalent value). A validator is called once at construction time, but only if a non-None value for the configuration option is specified the constructor's keyword arguments.
max_rpc_bytes
max_rpc_bytes(
*args
)
A descriptor for a Configuration option.
This class is used to create a configuration option on a class that inherits from BaseConfiguration. A validator function decorated with this class will be converted to a read-only descriptor and BaseConfiguration will implement constructor and merging logic for that configuration option. A validator function takes a single non-None value to validate and either throws an exception or returns that value (or an equivalent value). A validator is called once at construction time, but only if a non-None value for the configuration option is specified the constructor's keyword arguments.
merge
merge(
config
)
Merge two configurations.
The configuration given as an argument (if any) takes priority; defaults are filled in from the current configuration.
Args | |
---|---|
config
|
Configuration providing overrides, or None (but cannot be omitted). |
Returns | |
---|---|
Either a new configuration object or (if it would be equivalent) self or the config argument unchanged, but never None. |
Raises | |
---|---|
BadArgumentError if self or config are of configurations classes with conflicting options (i.e. the same option name defined in two different configuration classes). |
offset
offset(
*args
)
A descriptor for a Configuration option.
This class is used to create a configuration option on a class that inherits from BaseConfiguration. A validator function decorated with this class will be converted to a read-only descriptor and BaseConfiguration will implement constructor and merging logic for that configuration option. A validator function takes a single non-None value to validate and either throws an exception or returns that value (or an equivalent value). A validator is called once at construction time, but only if a non-None value for the configuration option is specified the constructor's keyword arguments.
on_completion
on_completion(
*args
)
A descriptor for a Configuration option.
This class is used to create a configuration option on a class that inherits from BaseConfiguration. A validator function decorated with this class will be converted to a read-only descriptor and BaseConfiguration will implement constructor and merging logic for that configuration option. A validator function takes a single non-None value to validate and either throws an exception or returns that value (or an equivalent value). A validator is called once at construction time, but only if a non-None value for the configuration option is specified the constructor's keyword arguments.
prefetch_size
prefetch_size(
*args
)
A descriptor for a Configuration option.
This class is used to create a configuration option on a class that inherits from BaseConfiguration. A validator function decorated with this class will be converted to a read-only descriptor and BaseConfiguration will implement constructor and merging logic for that configuration option. A validator function takes a single non-None value to validate and either throws an exception or returns that value (or an equivalent value). A validator is called once at construction time, but only if a non-None value for the configuration option is specified the constructor's keyword arguments.
produce_cursors
produce_cursors(
*args
)
A descriptor for a Configuration option.
This class is used to create a configuration option on a class that inherits from BaseConfiguration. A validator function decorated with this class will be converted to a read-only descriptor and BaseConfiguration will implement constructor and merging logic for that configuration option. A validator function takes a single non-None value to validate and either throws an exception or returns that value (or an equivalent value). A validator is called once at construction time, but only if a non-None value for the configuration option is specified the constructor's keyword arguments.
projection
projection(
*args
)
A descriptor for a Configuration option.
This class is used to create a configuration option on a class that inherits from BaseConfiguration. A validator function decorated with this class will be converted to a read-only descriptor and BaseConfiguration will implement constructor and merging logic for that configuration option. A validator function takes a single non-None value to validate and either throws an exception or returns that value (or an equivalent value). A validator is called once at construction time, but only if a non-None value for the configuration option is specified the constructor's keyword arguments.
read_policy
read_policy(
*args
)
A descriptor for a Configuration option.
This class is used to create a configuration option on a class that inherits from BaseConfiguration. A validator function decorated with this class will be converted to a read-only descriptor and BaseConfiguration will implement constructor and merging logic for that configuration option. A validator function takes a single non-None value to validate and either throws an exception or returns that value (or an equivalent value). A validator is called once at construction time, but only if a non-None value for the configuration option is specified the constructor's keyword arguments.
start_cursor
start_cursor(
*args
)
A descriptor for a Configuration option.
This class is used to create a configuration option on a class that inherits from BaseConfiguration. A validator function decorated with this class will be converted to a read-only descriptor and BaseConfiguration will implement constructor and merging logic for that configuration option. A validator function takes a single non-None value to validate and either throws an exception or returns that value (or an equivalent value). A validator is called once at construction time, but only if a non-None value for the configuration option is specified the constructor's keyword arguments.
__eq__
__eq__(
other
)
Return self==value.
__ne__
__ne__(
other
)
Return self!=value.
Class Variables | |
---|---|
ALL_READ_POLICIES |
|
ANCESTOR_FIRST |
2
|
APPLY_ALL_JOBS_CONSISTENCY |
2
|
EVENTUAL_CONSISTENCY |
1
|
FILTER_FIRST |
3
|
ORDER_FIRST |
1
|
STRONG_CONSISTENCY |
0
|