On Tue, Aug 11, 2009 at 7:46 PM, Jeff Enderwick<[email protected]> wrote:
>
> Thanks again Nick. Sorry to be a PITA. We've been told that
> TextProperty is effectively the same as StringProperty w/out the
> indexing (although the online doc indicates some max length
> differences).

That's correct. The length limitation on StringProperty is due to the indexing.

>
> What are the differences between ListProperty(db.Text) and
> StringListProperty(indexed=False), and what makes the latter better?

A ListProperty requires the elements to be the exact type specified,
so you'd have to explicitly cast all your items to db.Text. A
StringListProperty, however, will happily accept str, unicode, and (I
think) db.Text instances.

-Nick Johnson

>
> On Tue, Aug 11, 2009 at 3:55 AM, Nick Johnson
> (Google)<[email protected]> wrote:
>>
>> On Tue, Aug 11, 2009 at 7:04 AM, Jeff Enderwick<[email protected]> 
>> wrote:
>>>
>>> So, if I want StringListProperty, but I don't want/need the indexing,
>>> then I ought use ListProperty(db.Text)?
>>
>> A better option would be to use StringListProperty(indexed=False).
>>
>> -Nick Johnson
>>
>>>
>>> Thanks again,
>>> Jeff
>>>
>>> On Mon, Aug 10, 2009 at 11:35 AM, Nick Johnson
>>> (Google)<[email protected]> wrote:
>>>>
>>>> On Mon, Aug 10, 2009 at 7:25 PM, Jeff Enderwick<[email protected]> 
>>>> wrote:
>>>>>
>>>>> Thanks Nick. So in the case below, will the datastore then maintain an
>>>>> index on alist by default?
>>>>
>>>> Yes - str and unicode instances get indexed by default.
>>>>
>>>> -Nick
>>>>
>>>>>
>>>>> On Mon, Aug 10, 2009 at 3:35 AM, Nick Johnson
>>>>> (Google)<[email protected]> wrote:
>>>>>>
>>>>>> Hi Jeff,
>>>>>>
>>>>>> A StringListProperty is exactly equivalent, as far as the datastore is
>>>>>> concerned, to multiple individual String properties. That is, an
>>>>>> entity like this:
>>>>>>
>>>>>> MyEntity(astring="foo", alist=["foo", "bar"])
>>>>>>
>>>>>> is stored in the datastore analagous to this:
>>>>>>
>>>>>> (("astring", "foo"), ("alist", "foo"), ("alist", "bar"))
>>>>>>
>>>>>> -Nick Johnson
>>>>>>
>>>>>> On Sun, Aug 9, 2009 at 6:33 PM, Jeff Enderwick<[email protected]> 
>>>>>> wrote:
>>>>>>>
>>>>>>> Hey all, is there any datastop/API overhead difference between these
>>>>>>> two? Is there any difference in index (or lack thereof) maintenance by
>>>>>>> the datastore?
>>>>>>>
>>>>>>> Thanks,
>>>>>>> Jeff
>>>>>>>
>>>>>>> >
>>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> --
>>>>>> Nick Johnson, Developer Programs Engineer, App Engine
>>>>>>
>>>>>> >
>>>>>>
>>>>>
>>>>> >
>>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> Nick Johnson, Developer Programs Engineer, App Engine
>>>>
>>>> >
>>>>
>>>
>>> >
>>>
>>
>>
>>
>> --
>> Nick Johnson, Developer Programs Engineer, App Engine
>>
>> >
>>
>
> >
>



-- 
Nick Johnson, Developer Programs Engineer, App Engine

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to