diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2011-08-26 10:23:11 -0700 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2011-08-26 10:23:11 -0700 |
commit | 6c7575f8e8e7b741c2ca30aff86fe566ee4d361f (patch) | |
tree | 246d9abe8c1d4a428c450276ef25d67d06161827 /lib/arel/visitors/sqlite.rb | |
parent | 2aac990e4d68cc3cbf86ecc9565723b07f22c962 (diff) | |
parent | 481ccefedd407c1f8941596b03e72cfe35c42d41 (diff) | |
download | rails-6c7575f8e8e7b741c2ca30aff86fe566ee4d361f.tar.gz rails-6c7575f8e8e7b741c2ca30aff86fe566ee4d361f.tar.bz2 rails-6c7575f8e8e7b741c2ca30aff86fe566ee4d361f.zip |
Merge pull request #78 from ebeigarts/master
Support locking by default and disable it only for SQLite
Diffstat (limited to 'lib/arel/visitors/sqlite.rb')
-rw-r--r-- | lib/arel/visitors/sqlite.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/arel/visitors/sqlite.rb b/lib/arel/visitors/sqlite.rb index 237ae913bb..2a509e95b5 100644 --- a/lib/arel/visitors/sqlite.rb +++ b/lib/arel/visitors/sqlite.rb @@ -2,6 +2,11 @@ module Arel module Visitors class SQLite < Arel::Visitors::ToSql private + + # Locks are not supported in SQLite + def visit_Arel_Nodes_Lock o + end + def visit_Arel_Nodes_SelectStatement o o.limit = Arel::Nodes::Limit.new(-1) if o.offset && !o.limit super |