SyncIndexBuilder¶
- class aerospike_sdk.sync.operations.index.SyncIndexBuilder[source]¶
Bases:
objectSynchronous façade over
IndexBuilder.Chain
on_bin(),named(),numeric()/string(), optionalcollection(), thencreate()ordrop(); each mutating step is stored locally and replayed onto a fresh async builder when executing.See also
- __init__(async_client, namespace, set_name, loop_manager)[source]¶
Pair with
namespace/setand the parent’s loop manager.
- named(index_name)[source]¶
Set the secondary index name the cluster uses (required for create and drop).
- Return type:
- numeric()[source]¶
Set the secondary index type to numeric; use
string()for string bins.- Return type:
- string()[source]¶
Set the secondary index type to string; use
numeric()for numeric bins.- Return type:
- collection(collection_index_type)[source]¶
Set the collection index variant for map or list bins.
- Parameters:
collection_index_type (
CollectionIndexType) – Same ascollection().- Return type:
- context(ctx)[source]¶
Set a CDT context path for indexing a nested list or map element.
- Parameters:
ctx (
List[CTX]) – CDT path entries (e.g.,[CTX.map_key("outer")]).- Return type:
- Returns:
selffor method chaining.
- create()[source]¶
Create the index (blocks until the admin call completes).
- Raises:
ValueError – Same validation as async
create().AerospikeError – On failure from the cluster (typed when mapped).
- Return type:
- drop()[source]¶
Drop the index (blocks until the admin call completes).
- Raises:
ValueError – If the index name was not set via
named().AerospikeError – On failure from the cluster.
- Return type: