Changes

Jump to navigation Jump to search
→‎Querying: strike out mount points
Line 187: Line 187:  
  (results,count) = datastore.find(query, properties)
 
  (results,count) = datastore.find(query, properties)
   −
It returns the matching object's metadata as array of dictionaries, and a count of matching items (the array may have fewer items if the query was limited). In addition to the usual metadata items, each dictionary will include the object id at key 'uid', the mountpoint of the item at key 'mountpoint', and possibly a 'filename' if requested.
+
It returns the matching object's metadata as array of dictionaries, and a count of matching items (the array may have fewer items if the query was limited). In addition to the usual metadata items, each dictionary will include the object id at key 'uid', <strike>the mountpoint of the item at key 'mountpoint',</strike> and possibly a 'filename' if requested.
    
The '''properties''' argument is an array of strings. It defines which keys to include in the results. You should only specify the keys you actually need. If you pass an empty array here, all the metadata would be returned, which for a Journal with hundreds of entries and previews could amount to multiple megabytes of data.  
 
The '''properties''' argument is an array of strings. It defines which keys to include in the results. You should only specify the keys you actually need. If you pass an empty array here, all the metadata would be returned, which for a Journal with hundreds of entries and previews could amount to multiple megabytes of data.  
Line 199: Line 199:  
: 'order_by': sort key (or array of keys) to order results by, to reverse order use '-key' <i>(but see note below)</i>
 
: 'order_by': sort key (or array of keys) to order results by, to reverse order use '-key' <i>(but see note below)</i>
 
: 'limit', 'offset': return only limit results starting at offset
 
: 'limit', 'offset': return only limit results starting at offset
: 'mountpoints': array of [[#Mount Points|mountpoint ids]] to search (or all if not specified)
+
: <strike>'mountpoints': array of [[#Mount Points|mountpoint ids]] to search (or all if not specified) </strike>
 
: 'include_files': if true, generate files as if get_filename() had been called for each item. In results, a property 'filename' will be added.
 
: 'include_files': if true, generate files as if get_filename() had been called for each item. In results, a property 'filename' will be added.
  
132

edits

Navigation menu