[Sugar-devel] get list of titles in the datastore?
Erik Blankinship
erikb at mediamods.com
Mon Dec 13 17:29:04 EST 2010
As a note.. the function find with a { "query":my_search_string } tokenizes
both my_search_string and the datastore entries on white space. The
function returns true on any combination.
Journal Entries
Goo Bar
Goo Bee
datastore_entries, num_entries = datastore.find( {'query':'goo pretzel'} )
print( num_entries )
2
This is a little unexpected. What is the expected use case for this
implementation?
On Sat, Dec 4, 2010 at 6:53 AM, Bert Freudenberg <bert at freudenbergs.de>wrote:
> This limitation was already documented here:
>
>
> http://wiki.sugarlabs.org/go/Development_Team/Low-level_Activity_API#Querying
>
> To my knowledge that page is reasonably up-to-date. Please correct it if
> I'm wrong ;)
>
> - Bert -
>
> On 04.12.2010, at 04:03, Erik Blankinship wrote:
>
> from #sugar...
>
> *alsroot *: try datastore.find({'query':'coolthings'})
>
> *alsroot*: for now, only uid, activity, activity_id, mime_type and keep
> search term are supported
>
> On Fri, Dec 3, 2010 at 4:49 PM, Erik Blankinship <erikb at mediamods.com>wrote:
>
>> I tried using this bit of code to get a list of items in the journal by
>> their title, but it is returning everything in the journal!
>>
>> http://bit.ly/fjgpJr
>>
>> ds_objects, num_objects = datastore.find({'title':'file1.txt'})
>>
>>
>> Any suggestions?
>>
>>
> _______________________________________________
> Sugar-devel mailing list
> Sugar-devel at lists.sugarlabs.org
> http://lists.sugarlabs.org/listinfo/sugar-devel
>
>
>
> _______________________________________________
> Sugar-devel mailing list
> Sugar-devel at lists.sugarlabs.org
> http://lists.sugarlabs.org/listinfo/sugar-devel
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sugarlabs.org/archive/sugar-devel/attachments/20101213/e0544720/attachment.html>
More information about the Sugar-devel
mailing list