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.
315 316 317 |
# File 'lib/sequel/adapters/shared/sqlite.rb', line 315 def delete @opts[:where] ? super : filter(1=>1).delete end |