since its SQLite specific, you should just use literal DDL statements to create the table with this feature.
On Mar 19, 2007, at 10:57 AM, Karlo Lozovina wrote: > > Hi all, > > browsing the SQLAlchemy docs I coudn't find any references to a > particular SQLite feature, ON CONFLICT clause (http://www.sqlite.org/ > lang_conflict.html), is there any support for this in SA? What I want > to do is this, create my database as such: > > CREATE TABLE songs( > id INTEGER PRIMARY KEY ON CONFLICT REPLACE, > name TEXT > ); > > Now, when I do a bunch of INSERTs without specifying 'id' field, > everything works as you would expect. But, when I issue a INSERT with > a 'id' that allready exists, SQLite automatically and automagicaly > does an UPDATE instead. > > Now, this is very handy because I don't have to do a SELECT prior to > modifying a table. Is there a way to use this SQLite feature from SA? > Or somehow simulate it without too much gory details? > > Thanks guys, > klm. > > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To post to this group, send email to sqlalchemy@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sqlalchemy?hl=en -~----------~----~----~----~------~----~------~--~---