Skip to content

Commit

Permalink
add expression policy docs, add server 4.9 requirement warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
dwelch-spike committed Feb 18, 2021
1 parent a2f697d commit d701bf5
Show file tree
Hide file tree
Showing 5 changed files with 38 additions and 21 deletions.
5 changes: 4 additions & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,12 @@ Aerospike Python Client
Dependencies
------------

The Python client for Aerospike works with Python 2.7, 3.4, 3.5, 3.6, 3.7, 3.8 running on
The Python client for Aerospike works with Python 3.5, 3.6, 3.7, 3.8 running on
**64-bit** OS X 10.9+ and Linux.

NOTE: Python client 5.0.0 and up MUST be used with Aerospike server 4.9 or later.
If you see the error "-10, ‘Failed to connect’", please make sure you are using server 4.9 or later.

NOTE: The following dependencies only apply to installations that build from source
on linux, or OS X installations.
For client>=3.8.0 and pip>=19.0 on linux platforms, can skip to "Install" section.
Expand Down
2 changes: 1 addition & 1 deletion aerospike_helpers/expressions/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
Example::
import aerospike_helpers.expressions as exp
import aerospike_helpers.expressions.base as exp
# See if integer bin "bin_name" contains a value equal to 10.
expr = exp.Eq(exp.IntBin("bin_name"), 10).compile()
'''
Expand Down
36 changes: 22 additions & 14 deletions doc/client.rst
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,10 @@ Connection
:raises: :exc:`~aerospike.exception.ClientError`, for example when a connection cannot be \
established to a seed node (any single node in the cluster from which the client \
learns of the other nodes).

.. note::
Python client 5.0.0 and up will fail to connect to Aerospike server 4.8.x or older.
If you see the error "-10, ‘Failed to connect’", please make sure you are using server 4.9 or later.

.. seealso:: `Security features article <https://www.aerospike.com/docs/guide/security/index.html>`_.

Expand Down Expand Up @@ -2358,7 +2362,7 @@ Info Operations
:param str data_center: The data center to apply the filter to.
:param str namespace: The namespace to apply the filter to.
:param expression expression_filter: The filter to set. See :py:mod:`aerospike_helpers.expressions`.
:param expression expression_filter: The filter to set. See expressions at :py:mod:`aerospike_helpers`.
:param dict policy: optional :ref:`aerospike_info_policies`.
:raises: a subclass of :exc:`~aerospike.exception.AerospikeError`.
Expand Down Expand Up @@ -2817,9 +2821,9 @@ Write Policies
|
| Default: ``False``
.. note:: Requires Enterprise server version >= 3.10
* **predexp** :class:`list`
| A list of :mod:`aerospike.predexp` used as a predicate filter for record, bin, batch, and record UDF operations.
.. note:: Requires Enterprise server version >= 5.0
* **expressions** :class:`list`
| Compiled aerospike expressions :mod:`aerospike_helpers` used for filtering records within a transaction.
|
| Default: None
Expand Down Expand Up @@ -2896,8 +2900,10 @@ Read Policies
| One of the :ref:`POLICY_REPLICA` values such as :data:`aerospike.POLICY_REPLICA_MASTER`
|
| Default: ``aerospike.POLICY_REPLICA_SEQUENCE``
* **predexp** :class:`list`
| A list of :mod:`aerospike.predexp` used as a predicate filter for record, bin, batch, and record UDF operations.
.. note:: Requires Enterprise server version >= 5.0
* **expressions** :class:`list`
| Compiled aerospike expressions :mod:`aerospike_helpers` used for filtering records within a transaction.
|
| Default: None
Expand Down Expand Up @@ -2990,9 +2996,9 @@ Operate Policies
|
| Default: ``False``
.. note:: Requires Enterprise server version >= 3.10
* **predexp** :class:`list`
| A list of :mod:`aerospike.predexp` used as a predicate filter for record, bin, batch, and record UDF operations.
.. note:: Requires Enterprise server version >= 5.0
* **expressions** :class:`list`
| Compiled aerospike expressions :mod:`aerospike_helpers` used for filtering records within a transaction.
|
| Default: None
Expand Down Expand Up @@ -3067,9 +3073,9 @@ Apply Policies
|
| Default: ``False``
.. note:: Requires Enterprise server version >= 3.10
* **predexp** :class:`list`
| A list of :mod:`aerospike.predexp` used as a predicate filter for record, bin, batch, and record UDF operations.
.. note:: Requires Enterprise server version >= 5.0
* **expressions** :class:`list`
| Compiled aerospike expressions :mod:`aerospike_helpers` used for filtering records within a transaction.
|
| Default: None
Expand Down Expand Up @@ -3146,8 +3152,10 @@ Remove Policies
| One of the :ref:`POLICY_REPLICA` values such as :data:`aerospike.POLICY_REPLICA_MASTER`
|
| Default: ``aerospike.POLICY_REPLICA_SEQUENCE``
* **predexp** :class:`list`
| A list of :mod:`aerospike.predexp` used as a predicate filter for record, bin, batch, and record UDF operations.
.. note:: Requires Enterprise server version >= 5.0
* **expressions** :class:`list`
| Compiled aerospike expressions :mod:`aerospike_helpers` used for filtering records within a transaction.
|
| Default: None
Expand Down
6 changes: 6 additions & 0 deletions doc/query.rst
Original file line number Diff line number Diff line change
Expand Up @@ -559,6 +559,12 @@ Query Policies
|
| Default ``False``
.. note:: Requires Enterprise server version >= 5.0
* **expressions** :class:`list`
| Compiled aerospike expressions :mod:`aerospike_helpers` used for filtering records within a transaction.
|
| Default: None
.. _aerospike_query_options:

Query Options
Expand Down
10 changes: 5 additions & 5 deletions doc/scan.rst
Original file line number Diff line number Diff line change
Expand Up @@ -413,12 +413,12 @@ Scan Policies
| Requires server version >= 4.7.0.
|
| Default: ``0`` (no limit).
* **predexp** :class:`list`
| List of :mod:`~aerospike.predexp` used to filter scan results.
| Can be used with the :func:`~aerospike.Scan.results`, :func:`~aerospike.Scan.foreach`, and :func:`~aerospike.Scan.execute_background` methods.
| Requires server version >= 4.7.0 and Client version >= 3.10.0.
.. note:: Requires Enterprise server version >= 5.0
* **expressions** :class:`list`
| Compiled aerospike expressions :mod:`aerospike_helpers` used for filtering records within a transaction.
|
| Default: ``[]`` (no filter).
| Default: ``None``

.. _aerospike_scan_options:
Expand Down

0 comments on commit d701bf5

Please sign in to comment.