Method: Sequel::SQLite::DatasetMethods#insert_ignore
- Defined in:
- lib/sequel/adapters/shared/sqlite.rb
permalink #insert_ignore ⇒ Object
Ignore uniqueness/exclusion violations when inserting, using INSERT OR IGNORE. Exists mostly for compatibility to MySQL’s insert_ignore. Example:
DB[:table].insert_ignore.insert(a: 1, b: 2)
# INSERT OR IGNORE INTO TABLE (a, b) VALUES (1, 2)
790 791 792 |
# File 'lib/sequel/adapters/shared/sqlite.rb', line 790 def insert_ignore insert_conflict(:ignore) end |