Implement regular expression support for key searching 27/2027/8
authorTimo Tietavainen <timo.tietavainen@nokia.com>
Sun, 15 Dec 2019 18:16:23 +0000 (20:16 +0200)
committerTimo Tietavainen <timo.tietavainen@nokia.com>
Fri, 3 Jan 2020 14:45:14 +0000 (16:45 +0200)
commit276ed3c833c81a4142d7c4607474ee95a7f01355
tree9ed6f434663f5024c5aa011cee9d78edf4393bc7
parentf62fa0a9303c964c560a56951a924590b78150a0
Implement regular expression support for key searching

There is a use case to use only some part of the full key as a
searching criterion, as an example of such a criterion could be gNBID,
arp or qci. That's why change find_keys() and find_and_get() API
functions to take in a key search pattern instead of a key prefix.
A pattern can contain glob-style regular expression to match a key.

Removed also 'atomic' parameter of find_and_get(), because only
reasonable selection would be to use non-atomic option, which does not
block the whole Redis for a long time as atomic option could do.

Returned dictionary of matched key values are now sorted by key values
in alphabetical order.

Signed-off-by: Timo Tietavainen <timo.tietavainen@nokia.com>
Change-Id: I870089f51b1ce4d72c7984220af0f770b562563f
docs/release-notes.rst
ricsdl-package/examples/sync.py
ricsdl-package/ricsdl/__init__.py
ricsdl-package/ricsdl/backend/dbbackend_abc.py
ricsdl-package/ricsdl/backend/redis.py
ricsdl-package/ricsdl/syncstorage.py
ricsdl-package/ricsdl/syncstorage_abc.py
ricsdl-package/tests/backend/test_redis.py
ricsdl-package/tests/test_syncstorage.py