Method: Sequel::SQLite::DatasetMethods#delete

Defined in:
lib/sequel/adapters/shared/sqlite.rb

#delete(&block) ⇒ 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.



668
669
670
# File 'lib/sequel/adapters/shared/sqlite.rb', line 668

def delete(&block)
  @opts[:where] ? super : where(1=>1).delete(&block)
end