@@ -73,7 +73,7 @@ def version_id(self) -> int:
7373 the current version. It does not accept any parameters and simply outputs
7474 the version ID as an integer.
7575
76- : return: The version ID.
76+ @ return: The version ID.
7777 """
7878 return self ._version_id
7979
@@ -88,7 +88,7 @@ def modified_timestamp(self) -> datetime.datetime:
8888 """
8989 Get the time when the record was last modified.
9090
91- : return: The last modification timestamp.
91+ @ return: The last modification timestamp.
9292 """
9393 return self ._modified_timestamp
9494
@@ -97,15 +97,15 @@ def modifications_count(self) -> int:
9797 Get the number of modifications to the record since it was last created.
9898 If the record gets deleted and recreated, the ModificationsCount will restart at 0.
9999
100- : return: The number of modifications.
100+ @ return: The number of modifications.
101101 """
102102 return self ._modifications_count
103103
104104 def is_ephemeral (self ) -> bool :
105105 """
106106 Check if the record is ephemeral.
107107
108- : return: True if the record is ephemeral, False otherwise.
108+ @ return: True if the record is ephemeral, False otherwise.
109109 """
110110 return self ._session_id is not None
111111
@@ -115,7 +115,7 @@ def session_id(self) -> int:
115115 For ephemeral records, this is the identifier of the session to which this record lifecycle
116116 is attached to. Non-ephemeral records will always report 0.
117117
118- : return: The session ID.
118+ @ return: The session ID.
119119 """
120120 return self ._session_id
121121
@@ -125,7 +125,7 @@ def client_identity(self) -> str:
125125 For ephemeral records, this is the unique identity of the Oxia client that did last modify it.
126126 It will be empty for all non-ephemeral records.
127127
128- : return: The client identity.
128+ @ return: The client identity.
129129 """
130130 return self ._client_identity
131131
@@ -162,11 +162,11 @@ def __init__(self, service_address: str,
162162 and connection pooling. The constructor is responsible for setting up the required
163163 infrastructure to communicate with the service discovery system and maintain sessions.
164164
165- : param service_address: The Oxia service address to connect to.
166- : param namespace: The namespace to which this client belongs. Default is "default".
167- : param session_timeout_ms: Duration of the session timeout in milliseconds. Default is 30,000 ms.
168- : param client_identifier: A unique identifier for the client. If None, a default identifier will
169- be generated internally.
165+ @ param service_address: The Oxia service address to connect to.
166+ @ param namespace: The namespace to which this client belongs. Default is "default".
167+ @ param session_timeout_ms: Duration of the session timeout in milliseconds. Default is 30,000 ms.
168+ @ param client_identifier: A unique identifier for the client. If None, a default identifier will
169+ be generated internally.
170170 """
171171 self ._closed = False
172172 self ._connections = ConnectionPool ()
@@ -189,18 +189,18 @@ def put(self, key: str, value: object,
189189 - Client can assert that the record does not exist by passing [oxia.EXPECTED_RECORD_DOES_NOT_EXIST]
190190 - Client can create an ephemeral record with `ephemeral=True`
191191
192- : param key: the key to associate with the value
193- : param value: the value to associate with the key
194- : type value: str | bytes
195- : param sequence_keys_deltas: a list of sequence keys to be used as deltas for the key. Oxia will create
196- new unique keys atomically adding the sequence key deltas to the key.
197- : param secondary_indexes: a dictionary of secondary indexes to be created for the record.
198- : param partition_key: the partition key to use (instead of the actual record key)
199- : param expected_version_id: the expected version id of the record to insert. If not specified, the put operation is not conditional.
200- : param ephemeral: whether the record should be created as ephemeral. Ephemeral records are deleted when the session expires.
201- : return: (actual_key, version)
202- : raises oxia.ex.InvalidOptions: if the sequence_keys_deltas option is used with partition_key
203- : raises oxia.ex.UnexpectedVersionId: if the expected version id does not match the current version id of the record
192+ @ param key: the key to associate with the value
193+ @ param value: the value to associate with the key
194+ @ type value: str | bytes
195+ @ param sequence_keys_deltas: a list of sequence keys to be used as deltas for the key. Oxia will create
196+ new unique keys atomically adding the sequence key deltas to the key.
197+ @ param secondary_indexes: a dictionary of secondary indexes to be created for the record.
198+ @ param partition_key: the partition key to use (instead of the actual record key)
199+ @ param expected_version_id: the expected version id of the record to insert. If not specified, the put operation is not conditional.
200+ @ param ephemeral: whether the record should be created as ephemeral. Ephemeral records are deleted when the session expires.
201+ @ return: (actual_key, version)
202+ @ raises oxia.ex.InvalidOptions: if the sequence_keys_deltas option is used with partition_key
203+ @ raises oxia.ex.UnexpectedVersionId: if the expected version id does not match the current version id of the record
204204 """
205205 shard , stub = self ._service_discovery .get_leader (key , partition_key )
206206
@@ -247,12 +247,12 @@ def delete(self, key: str,
247247 The delete operation can be made conditional on that the record hasn't changed from
248248 a specific existing version by passing the [ExpectedVersionId] option.
249249
250- : param key: the key to delete
251- : param partition_key: the partition key to use (instead of the actual record key)
252- : param expected_version_id: the expected version id of the record to delete. If not specified, the delete operation is not conditional.
253- : return: true if the record was deleted, false otherwise
254- : raises oxia.ex.KeyNotFound: if the record does not exist
255- : raises oxia.ex.UnexpectedVersionId: if the expected version id does not match the current version id of the record
250+ @ param key: the key to delete
251+ @ param partition_key: the partition key to use (instead of the actual record key)
252+ @ param expected_version_id: the expected version id of the record to delete. If not specified, the delete operation is not conditional.
253+ @ return: true if the record was deleted, false otherwise
254+ @ raises oxia.ex.KeyNotFound: if the record does not exist
255+ @ raises oxia.ex.UnexpectedVersionId: if the expected version id does not match the current version id of the record
256256 """
257257 shard , stub = self ._service_discovery .get_leader (key , partition_key )
258258
@@ -275,9 +275,9 @@ def delete_range(self, min_key_inclusive: str, max_key_exclusive: str, partitio
275275 Refer to this documentation for the specifics:
276276 https://oxia-db.github.io/docs/features/oxia-key-sorting
277277
278- : param min_key_inclusive: the minimum key to delete from
279- : param max_key_exclusive: the maximum key to delete to (exclusive)
280- : param partition_key: if set, the delete range will be applied to the shard with the specified partition key.
278+ @ param min_key_inclusive: the minimum key to delete from
279+ @ param max_key_exclusive: the maximum key to delete to (exclusive)
280+ @ param partition_key: if set, the delete range will be applied to the shard with the specified partition key.
281281 """
282282
283283 if partition_key is None :
@@ -307,13 +307,13 @@ def get(self, key: str,
307307
308308 In addition to the value, a version object is also returned, with information about the record state.
309309
310- : param key: the key to retrieve
311- : param partition_key: the partition key to use (instead of the actual record key)
312- : param comparison_type: the comparison type to use
313- : param include_value: whether to include the value in the result
314- : param use_index: the name of the secondary index to use
315- : return: (key, value, version)
316- : raises oxia.ex.KeyNotFound: if the record does not exist
310+ @ param key: the key to retrieve
311+ @ param partition_key: the partition key to use (instead of the actual record key)
312+ @ param comparison_type: the comparison type to use
313+ @ param include_value: whether to include the value in the result
314+ @ param use_index: the name of the secondary index to use
315+ @ return: (key, value, version)
316+ @ raises oxia.ex.KeyNotFound: if the record does not exist
317317 """
318318 if partition_key is None and \
319319 (comparison_type != ComparisonType .EQUAL
@@ -370,11 +370,11 @@ def list(self, min_key_inclusive: str, max_key_exclusive: str,
370370 Refer to this documentation for the specifics:
371371 https://oxia-db.github.io/docs/features/oxia-key-sorting
372372
373- : param min_key_inclusive: the minimum key to list from (inclusive).
374- : param max_key_exclusive: the maximum key to list to (exclusive).
375- : param partition_key: if set, the list will be applied to the shard with the specified partition key.
376- : param use_index: if set, the list will be applied to the secondary index with the specified name.
377- : return: the list of keys within the specified range.
373+ @ param min_key_inclusive: the minimum key to list from (inclusive).
374+ @ param max_key_exclusive: the maximum key to list to (exclusive).
375+ @ param partition_key: if set, the list will be applied to the shard with the specified partition key.
376+ @ param use_index: if set, the list will be applied to the secondary index with the specified name.
377+ @ return: the list of keys within the specified range.
378378 """
379379 if partition_key is None :
380380 all_res = []
@@ -411,11 +411,11 @@ def range_scan(self,
411411 Refer to this documentation for the specifics:
412412 https://oxia-db.github.io/docs/features/oxia-key-sorting
413413
414- : param min_key_inclusive: the minimum key to list from (inclusive).
415- : param max_key_exclusive: the maximum key to list to (exclusive).
416- : param partition_key: if set, the range-scan will be applied to the shard with the specified partition key.
417- : param use_index: if set, the range-scan will be applied to the secondary index with the specified name.
418- : return: an iterator over the records within the specified range. Each record is a tuple of (key, value, version).
414+ @ param min_key_inclusive: the minimum key to list from (inclusive).
415+ @ param max_key_exclusive: the maximum key to list to (exclusive).
416+ @ param partition_key: if set, the range-scan will be applied to the shard with the specified partition key.
417+ @ param use_index: if set, the range-scan will be applied to the secondary index with the specified name.
418+ @ return: an iterator over the records within the specified range. Each record is a tuple of (key, value, version).
419419 """
420420 if partition_key is None :
421421 its = []
@@ -444,9 +444,9 @@ def get_sequence_updates(self, prefix_key: str, partition_key: str = None) -> Se
444444
445445 Multiple updates can be collapsed into one single event with the highest sequence.
446446
447- : param prefix_key: the prefix for the sequential key.
448- : param partition_key: the partition key to use (this is required)
449- : return: a SequenceUpdates object that can be used to iterate over the updates. Should be closed when done.
447+ @ param prefix_key: the prefix for the sequential key.
448+ @ param partition_key: the partition key to use (this is required)
449+ @ return: a SequenceUpdates object that can be used to iterate over the updates. Should be closed when done.
450450 """
451451 if partition_key is None :
452452 raise oxia .ex .InvalidOptions ("get_sequence_updates requires a partition_key" )
@@ -457,8 +457,8 @@ def get_notifications(self) -> Iterator[oxia.defs.Notification]:
457457 Creates a new subscription to receive the notifications
458458 from Oxia for any change that is applied to the database
459459
460- : return: an iterator over the notifications. Each notification is a Notification object.
461- : rtype: Iterator[oxia.Notification]
460+ @ return: an iterator over the notifications. Each notification is a Notification object.
461+ @ rtype: Iterator[oxia.Notification]
462462 """
463463 return Notifications (self ._service_discovery )
464464
0 commit comments