From: Antony Chazapis Date: Thu, 15 Dec 2011 11:51:39 +0000 (+0200) Subject: Update dev guide with meta queries. X-Git-Tag: pithos/v0.8.2~17 X-Git-Url: https://code.grnet.gr/git/pithos/commitdiff_plain/4e5673a085e2c4fc4ad631235d2a4b0a841d6b86?ds=sidebyside Update dev guide with meta queries. Fixes #1766 --- diff --git a/docs/source/devguide.rst b/docs/source/devguide.rst index b94ecca..0f38015 100644 --- a/docs/source/devguide.rst +++ b/docs/source/devguide.rst @@ -25,9 +25,10 @@ Document Revisions ========================= ================================ Revision Description ========================= ================================ -0.8 (Dec 2, 2011) Update allowed versioning values. +0.8 (Dec 15, 2011) Update allowed versioning values. \ Change policy/meta formatting in JSON/XML replies. \ Document that all non-ASCII characters in headers should be URL-encoded. +\ Support metadata-based queries when listing objects at the container level. 0.7 (Nov 21, 2011) Suggest upload/download methods using hashmaps. \ Propose syncing algorithm. \ Support cross-account object copy and move. @@ -441,7 +442,7 @@ prefix Return objects starting with prefix delimiter Return objects up to the delimiter (discussion follows) path Assume ``prefix=path`` and ``delimiter=/`` format Optional extended reply type (can be ``json`` or ``xml``) -meta Return objects having the specified meta keys (can be a comma separated list) +meta Return objects that satisfy the key queries in the specified comma separated list (use ````, ``!`` for existence queries, ```` for value queries, where ```` can be one of ``=``, ``!=``, ``<=``, ``>=``, ``<``, ``>``) shared Show only shared objects (no value parameter) until Optional timestamp ====================== =================================== @@ -489,7 +490,7 @@ x_object_meta_* Optional user defined metadata Extended replies may also include virtual directory markers in separate sections of the ``json`` or ``xml`` results. Virtual directory markers are only included when ``delimiter`` is explicitly set. They correspond to the substrings up to and including the first occurrence of the delimiter. -In JSON results they appear as dictionaries with only a ``"subdir"`` key. In XML results they appear interleaved with ```` tags as ````. +In JSON results they appear as dictionaries with only a ``subdir`` key. In XML results they appear interleaved with ```` tags as ````. In case there is an object with the same name as a virtual directory marker, the object will be returned. Example ``format=json`` reply: diff --git a/pithos/backends/base.py b/pithos/backends/base.py index 9a6c2d8..6debef0 100644 --- a/pithos/backends/base.py +++ b/pithos/backends/base.py @@ -289,7 +289,7 @@ class BaseBackend(object): 'keys': Include objects that satisfy the key queries in the list. Use 'key', '!key' for existence queries, 'key op value' for - value queries, where 'op' can be one of =, != <=, >=, <, > + value queries, where 'op' can be one of =, !=, <=, >=, <, > 'shared': Only list objects with permissions set