[Chicago] appengine

Massimo Di Pierro mdipierro at cs.depaul.edu
Wed Apr 23 07:15:42 CEST 2008


fantastic. Thanks.


On Apr 23, 2008, at 12:10 AM, Cosmin Stejerean wrote:

> http://code.google.com/appengine/docs/datastore/gqlreference.html
>
>> From the reference
>
> The left-hand side of a comparison is always a property name. The
> right-hand side can be one of the following (as appropriate for the
> property's data type):
>
>     * a str literal, as a single-quoted string. Single-quote
> characters in the string must be escaped as ''. For example: 'Joe''s
> Diner'
>
> That's the only thing that needs escaping as far as I can tell.
>
> - Cosmin
>
> On Wed, Apr 23, 2008 at 12:01 AM, Massimo Di Pierro
> <mdipierro at cs.depaul.edu> wrote:
>> Does anybody know how the appengine escapes strings in gqlquery?
>>
>> For example this is
>> q = GqlQuery("SELECT * FROM Song WHERE title= :1", "Imagine")
>> the same as
>> q = GqlQuery("SELECT * FROM Song WHERE title = 'Imagine'")
>>
>>
>> Is this the same as
>> q = GqlQuery("SELECT * FROM Song WHERE title= :1", "Ima'gine")
>> this
>> q = GqlQuery("SELECT * FROM Song WHERE title = 'Ima''gine'")
>> ?
>>
>> How are quotes escaped? What about other ascii charcaters?
>> Please, please... I know the :1 API are better and the query API  
>> are even
>> better but I need to know this.
>>
>> Massimo
>> _______________________________________________
>>  Chicago mailing list
>>  Chicago at python.org
>>  http://mail.python.org/mailman/listinfo/chicago
>>
>>
>
>
>
> --
> Cosmin Stejerean
> http://blog.offbytwo.com
> _______________________________________________
> Chicago mailing list
> Chicago at python.org
> http://mail.python.org/mailman/listinfo/chicago



More information about the Chicago mailing list