@@ -152,11 +152,9 @@ Record Commands
152152
153153 Create a new record, or remove / add bins to a record.
154154
155- .. include :: ./deprecate_meta_ttl.rst
156-
157155 :param tuple key: a :ref: `aerospike_key_tuple ` associated with the record.
158156 :param dict bins: contains bin name-value pairs of the record.
159- :param dict meta: record metadata to be set . see :ref: `metadata_dict `.
157+ :param dict meta: record generation to compare . see :ref: `metadata_dict `.
160158 :param dict policy: see :ref: `aerospike_write_policies `.
161159
162160 :param serializer: override the serialization mode of the client \
@@ -317,11 +315,9 @@ Record Commands
317315 (In Aerospike server versions prior to 3.6.0, non-existent bins being read will have a \
318316 :py:obj: `None ` value. )
319317
320- .. include :: ./deprecate_meta_ttl.rst
321-
322318 :param tuple key: a :ref: `aerospike_key_tuple ` associated with the record.
323319 :param list list: See :ref: `aerospike_operation_helpers.operations `.
324- :param dict meta: record metadata to be set . See :ref: `metadata_dict `.
320+ :param dict meta: record generation to compare . See :ref: `metadata_dict `.
325321 :param dict policy: optional :ref: `aerospike_operate_policies `.
326322 :return: a :ref: `aerospike_record_tuple `.
327323 :raises: a subclass of :exc: `~aerospike.exception.AerospikeError `.
@@ -372,11 +368,9 @@ Record Commands
372368
373369 Write operations or read operations that fail will not return a ``(bin-name, result) `` tuple.
374370
375- .. include :: ./deprecate_meta_ttl.rst
376-
377371 :param tuple key: a :ref: `aerospike_key_tuple ` associated with the record.
378372 :param list list: See :ref: `aerospike_operation_helpers.operations `.
379- :param dict meta: record metadata to be set . See :ref: `metadata_dict `.
373+ :param dict meta: record generation to compare . See :ref: `metadata_dict `.
380374 :param dict policy: optional :ref: `aerospike_operate_policies `.
381375
382376 :return: a :ref: `aerospike_record_tuple `.
@@ -414,13 +408,9 @@ Record Commands
414408
415409 Touch the given record, setting its time-to-live and incrementing its generation.
416410
417- .. versionchanged :: 19.1.0
418-
419- Deprecated the ``meta["ttl"] `` parameter. Use the ``val `` parameter instead.
420-
421411 :param tuple key: a :ref: `aerospike_key_tuple ` associated with the record.
422412 :param int val: ttl in seconds, with ``0 `` resolving to the default value in the server config.
423- :param dict meta: record metadata to be set . see :ref: `metadata_dict `
413+ :param dict meta: record generation to compare . see :ref: `metadata_dict `
424414 :param dict policy: see :ref: `aerospike_operate_policies `.
425415
426416 :raises: a subclass of :exc: `~aerospike.exception.AerospikeError `.
@@ -446,16 +436,11 @@ Record Commands
446436 {'ttl': 2592000, 'gen': 1}
447437 {'ttl': 120, 'gen': 2}
448438
449- .. method :: remove(key[meta: dict[ , policy: dict] ])
439+ .. method :: remove(key[, policy: dict])
450440
451441 Remove a record matching the *key * from the cluster.
452442
453- .. versionchanged :: 19.1.0
454-
455- Deprecated the ``meta `` parameter. Use the policy parameter to set ``gen `` instead.
456-
457443 :param tuple key: a :ref: `aerospike_key_tuple ` associated with the record.
458- :param dict meta: contains the expected generation of the record in a key called ``"gen" ``.
459444 :param dict policy: see :ref: `aerospike_remove_policies `. May be passed as a keyword argument.
460445
461446 :raises: a subclass of :exc: `~aerospike.exception.AerospikeError `.
@@ -468,7 +453,7 @@ Record Commands
468453
469454 # Try to remove it with the wrong generation
470455 try:
471- client.remove(keyTuple, meta ={'gen': 5}, policy={'gen ': aerospike.POLICY_GEN_EQ })
456+ client.remove(keyTuple, policy ={'gen': aerospike.POLICY_GEN_EQ, 'generation ': 5 })
472457 except ex.AerospikeError as e:
473458 print("Error: {0} [{1}]".format(e.msg, e.code))
474459
@@ -484,11 +469,9 @@ Record Commands
484469 Remove a list of bins from a record with a given *key *. Equivalent to \
485470 setting those bins to :meth: `aerospike.null ` with a :meth: `~aerospike.Client.put `.
486471
487- .. include :: ./deprecate_meta_ttl.rst
488-
489472 :param tuple key: a :ref: `aerospike_key_tuple ` associated with the record.
490473 :param list list: the bins names to be removed from the record.
491- :param dict meta: record metadata to be set . See :ref: `metadata_dict `.
474+ :param dict meta: record generation to compare . See :ref: `metadata_dict `.
492475 :param dict policy: optional :ref: `aerospike_write_policies `.
493476
494477 :raises: a subclass of :exc: `~aerospike.exception.AerospikeError `.
@@ -817,12 +800,10 @@ String Operations
817800
818801 Append a string to the string value in bin.
819802
820- .. include :: ./deprecate_meta_ttl.rst
821-
822803 :param tuple key: a :ref: `aerospike_key_tuple ` tuple associated with the record.
823804 :param str bin: the name of the bin.
824805 :param str val: the string to append to the bin value.
825- :param dict meta: record metadata to be set . See :ref: `metadata_dict `.
806+ :param dict meta: record generation to compare . See :ref: `metadata_dict `.
826807 :param dict policy: optional :ref: `aerospike_operate_policies `.
827808
828809 :raises: a subclass of :exc: `~aerospike.exception.AerospikeError `.
@@ -844,12 +825,10 @@ String Operations
844825
845826 Prepend the string value in *bin * with the string *val *.
846827
847- .. include :: ./deprecate_meta_ttl.rst
848-
849828 :param tuple key: a :ref: `aerospike_key_tuple ` tuple associated with the record.
850829 :param str bin: the name of the bin.
851830 :param str val: the string to prepend to the bin value.
852- :param dict meta: record metadata to be set . See :ref: `metadata_dict `.
831+ :param dict meta: record generation to compare . See :ref: `metadata_dict `.
853832 :param dict policy: optional :ref: `aerospike_operate_policies `.
854833
855834 :raises: a subclass of :exc: `~aerospike.exception.AerospikeError `.
@@ -880,13 +859,11 @@ Numeric Operations
880859
881860 Increment the integer value in *bin * by the integer *val *.
882861
883- .. include :: ./deprecate_meta_ttl.rst
884-
885862 :param tuple key: a :ref: `aerospike_key_tuple ` tuple associated with the record.
886863 :param str bin: the name of the bin.
887864 :param int offset: the value by which to increment the value in *bin *.
888865 :type offset: :py:class: `int ` or :py:class: `float `
889- :param dict meta: record metadata to be set . See :ref: `metadata_dict `.
866+ :param dict meta: record generation to compare . See :ref: `metadata_dict `.
890867 :param dict policy: optional :ref: `aerospike_operate_policies `. Note: the ``exists `` policy option may not be: :py:data: `aerospike.POLICY_EXISTS_CREATE_OR_REPLACE ` nor :py:data: `aerospike.POLICY_EXISTS_REPLACE `
891868 :raises: a subclass of :exc: `~aerospike.exception.AerospikeError `.
892869
@@ -1519,24 +1496,6 @@ Index Operations
15191496
15201497 client.index_geo2dsphere_create('test', 'pads', 'loc', 'pads_loc_geo')
15211498
1522- .. method :: index_cdt_create(ns: str, set: str, bin: str, index_type, index_datatype, index_name: str, ctx: list[, policy: dict])
1523-
1524- .. deprecated :: 19.1.0 Use the other non-deprecated index methods to create an index with a list of contexts.
1525-
1526- Create an collection data type (CDT) index named *index_name * for a scalar, list values, map keys, or map values (as defined by *index_type *) and for
1527- numeric, string, or GeoJSON values (as defined by *index_datatype *)
1528- on records of the specified *ns *, *set * whose bin is a list or map.
1529-
1530- :param str ns: the namespace in the aerospike cluster.
1531- :param str set: the set name.
1532- :param str bin: the name of bin the secondary index is built on.
1533- :param index_type: whether we are querying a single scalar value or specific values of a CDT type. See :ref: `aerospike_index_types `.
1534- :param index_datatype: the type of value being queried on. See :ref: `aerospike_index_datatypes `.
1535- :param str index_name: the name of the index.
1536- :param dict ctx: a :class: `list ` of contexts produced by :mod: `aerospike_helpers.cdt_ctx ` methods.
1537- :param dict policy: optional :ref: `aerospike_info_policies `.
1538- :raises: a subclass of :exc: `~aerospike.exception.AerospikeError `.
1539-
15401499 .. index ::
15411500 single: Admin Operations
15421501
@@ -2032,8 +1991,9 @@ Metadata Dictionary
20321991
20331992The metadata dictionary has the following key-value pairs:
20341993
2035- * ``"ttl" `` (:class: `int `): record time to live in seconds. See :ref: `TTL_CONSTANTS ` for possible special values.
2036- * ``"gen" `` (:class: `int `): record generation
1994+ * ``"ttl" `` (:class: `int `): record time to live in seconds. This field is read only.
1995+ * ``"gen" `` (:class: `int `): record generation. If passing as input, this is the expected record generation.
1996+ If returned as an output, this is the current record generation.
20371997
20381998.. _aerospike_policies :
20391999
0 commit comments