[Chicago] appengine

Cosmin Stejerean cstejerean at gmail.com
Wed Apr 23 07:12:00 CEST 2008


I'm not sure if it's obvious with the font (at least the one I'm
using) but the '' is actually 2 single quotes not a double quote
character.

- Cosmin

On Wed, Apr 23, 2008 at 12:10 AM, Cosmin Stejerean <cstejerean at gmail.com> 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
>



-- 
Cosmin Stejerean
http://blog.offbytwo.com


More information about the Chicago mailing list