Method: Sequel::SQLite::DatasetMethods#delete
- Defined in:
- lib/sequel/adapters/shared/sqlite.rb
#delete ⇒ Object
SQLite performs a TRUNCATE style DELETE if no filter is specified. Since we want to always return the count of records, add a condition that is always true and then delete.
572 573 574 |
# File 'lib/sequel/adapters/shared/sqlite.rb', line 572 def delete @opts[:where] ? super : where(1=>1).delete end |