[google-appengine] Re: Will there ever be a DictProperty in datastore?

2008-10-30 Thread yejun
There's a difference between property and datastore type. On Oct 30, 4:30 pm, luismgz <[EMAIL PROTECTED]> wrote: > There are other options too, such as pickling a dictionary into a blob > property, or saving its string representation into a StringProperty > and then use eval() to get it back "ali

[google-appengine] Re: Will there ever be a DictProperty in datastore?

2008-10-30 Thread luismgz
There are other options too, such as pickling a dictionary into a blob property, or saving its string representation into a StringProperty and then use eval() to get it back "alive". However, all these have issues and I guess that performance-wise they are suboptimal... On Oct 30, 1:16 pm, Antho

[google-appengine] Re: Will there ever be a DictProperty in datastore?

2008-10-30 Thread Anthony
I don't know if this will help but I've built a custom property for dealing with basic dict items. It's based on StringListProperty, so you still have some indexing for searching on keys, or "key:value" pairs. The code has not been tested much yet... class DictListProperty(db.StringListProperty)

[google-appengine] Re: Will there ever be a DictProperty in datastore?

2008-10-29 Thread luismgz
Hey, don't forget to star this issue: http://code.google.com/p/googleappengine/issues/detail?id=805&q=dictproperty&colspec=ID%20Type%20Status%20Priority%20Stars%20Owner%20Summary%20Log%20Component On Oct 29, 9:30 am, "Dr. Ernie" <[EMAIL PROTECTED]> wrote: > > I agree - in a couple of cases I ha

[google-appengine] Re: Will there ever be a DictProperty in datastore?

2008-10-29 Thread Dr. Ernie
> I agree - in a couple of cases I have created dual lists in a model, > rather than have the overhead of pickling. This has the bonus of > allowing both "key" and value be searchable, but I'd love native > dicts. +1 I'm considering sticking JSON in a field to deal with this problem, but native

[google-appengine] Re: Will there ever be a DictProperty in datastore?

2008-10-29 Thread Greg
On Oct 29, 10:11 am, luismgz <[EMAIL PROTECTED]> wrote: > Is there any reason for not having implemented a DictProperty in > datastore? I agree - in a couple of cases I have created dual lists in a model, rather than have the overhead of pickling. This has the bonus of allowing both "key" and val

[google-appengine] Re: Will there ever be a DictProperty in datastore?

2008-10-28 Thread yejun
Dict is not indexable. On Oct 28, 5:11 pm, luismgz <[EMAIL PROTECTED]> wrote: > Is there any reason for not having implemented a DictProperty in > datastore? > Are there plans to implement it? > I believe it would be great to have native dictionaries in datastore, > and that it would simplify a l

[google-appengine] Re: Will there ever be a DictProperty in datastore?

2008-10-28 Thread Andy Freeman
I defined and posted a PickleProperty definition that supports dicts and all other pickleable datatypes. On Oct 28, 2:11 pm, luismgz <[EMAIL PROTECTED]> wrote: > Is there any reason for not having implemented a DictProperty in > datastore? > Are there plans to implement it? > I believe it would b