On Monday, June 9, 2014 10:33:29 PM UTC-7, Jeremy Evans wrote:
>
> Looking at the gem you mentioned, they use INSERT OR IGNORE on SQLite, 
> which is not like an upsert/merge operation, since it does not update the 
> row if it already exists.  That's similar to Dataset#insert_ignore in 
> Sequel's MySQL support.  I don't think Sequel supports that syntax on 
> SQLite, but I'd consider adding support for it.  The fact that the gem you 
> mentioned uses INSERT OR IGNORE on SQLite but uses a UDF emulation on 
> PostgreSQL and MySQL that does will update the row if it already exists 
> would discourage me from using it if I wanted portable code (or a true 
> upsert/merge on SQLite).
>

Looking more at the implementation of the gem, it always issues an UPDATE 
after the INSERT OR IGNORE, so it does produce correct behavior, it's just 
less efficient.

Thanks,
Jeremy 

-- 
You received this message because you are subscribed to the Google Groups 
"sequel-talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sequel-talk.
For more options, visit https://groups.google.com/d/optout.

Reply via email to