SyncRecordStream¶
- class aerospike_sdk.sync.record_stream.SyncRecordStream[source]¶
Bases:
objectBlocking view of
RecordStream.Iterator protocol and helpers (
first,collect, …) call into the underlying async stream via the parent client’s event-loop manager, so each step may block the calling thread until data is ready.Behavior vs async: Ordering and per-row semantics match
RecordStream; only the API surface is synchronous.close()closes the async stream directly without crossing the loop (releases resources; pending async iteration should stop).Example:
with SyncClient("localhost:3000") as client: session = client.create_session() for row in session.query(ns, set).bins(["name"]).execute(): if row.record: print(row.record.bins)
See also
- first_or_raise()[source]¶
Return the first row or raise if the stream is empty or not OK.
- Raises:
AerospikeError – On a failed row or empty-stream error from the async layer. See
first_or_raise().- Return type: