diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2011-04-28 15:42:16 -0700 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2011-04-29 11:09:37 -0700 |
commit | 453bd2f39dfc59641a2d9028088c99e0fd529242 (patch) | |
tree | 34085faa6440e311c0c0791e9dedcd090df3b985 | |
parent | f1df6b2dce8bda94186d66b9edd5e727e0d05878 (diff) | |
download | rails-453bd2f39dfc59641a2d9028088c99e0fd529242.tar.gz rails-453bd2f39dfc59641a2d9028088c99e0fd529242.tar.bz2 rails-453bd2f39dfc59641a2d9028088c99e0fd529242.zip |
sqlite3 supports prepared statement deletes
-rw-r--r-- | activerecord/lib/active_record/connection_adapters/sqlite_adapter.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/activerecord/lib/active_record/connection_adapters/sqlite_adapter.rb b/activerecord/lib/active_record/connection_adapters/sqlite_adapter.rb index ed5006dcec..ad511a0731 100644 --- a/activerecord/lib/active_record/connection_adapters/sqlite_adapter.rb +++ b/activerecord/lib/active_record/connection_adapters/sqlite_adapter.rb @@ -178,6 +178,11 @@ module ActiveRecord end end + def exec_delete(sql, name = 'SQL', binds = []) + exec_query(sql, name, binds) + @connection.changes + end + def last_inserted_id(result) @connection.last_insert_row_id end |