Re: [sqlalchemy] Dialect dependent REPLACEs

2013-09-19 Thread Michael Bayer
On Sep 17, 2013, at 6:32 PM, Samer Atiani sati...@gmail.com wrote: Hello, I'm trying to write a custom REPLACE expression that compiles differently on MySQL vs sqlite, namely it would look like REPLACE INTO in mysql and INSERT OR REPLACE in sqlite. I implemented it like so: class

[sqlalchemy] Dialect dependent REPLACEs

2013-09-17 Thread Samer Atiani
Hello, I'm trying to write a custom REPLACE expression that compiles differently on MySQL vs sqlite, namely it would look like REPLACE INTO in mysql and INSERT OR REPLACE in sqlite. I implemented it like so: class ReplaceInto(ValuesBase): def __init__(self, table, values=None):