On Tue, Aug 24, 2004 at 03:37:15PM -0400, D. Richard Hipp wrote:
> >
> >d = { 'blob': 'a\0b', 'id': 2 }
> >cursor.execute("UPDATE t1 SET value=%(bigblob)s WHERE rowid=%(id)d", d)
> >
> 
> I'd be willing to extend the lexer/parser of SQLite to accept this kind
> of thing.  The only problem here is that '%' is already used to mean the
> remainder-after-integer-division operator, like in C.  Could another
> character be used instead?  "@" perhaps?  Or maybe two "%%" instead of
> just '%'?

It's awfully Python-specific.  I think adopting something that other
SQL engines use (":name") would be more generic.  SQLServer uses
"@name" iirc.

Cheers,

Matt

Reply via email to