aboutsummaryrefslogtreecommitdiffstats
path: root/lib/arel/nodes
diff options
context:
space:
mode:
authorAaron Patterson <aaron.patterson@gmail.com>2010-09-10 09:47:50 -0700
committerAaron Patterson <aaron.patterson@gmail.com>2010-09-10 09:47:50 -0700
commitac2bdd1dd31c8b89578ae7f490a898838b9ef6e0 (patch)
treeeaa458133ed06fc90532a4bdc0872ac09e05b65e /lib/arel/nodes
parent9efae8f92de2361d50dc3ee9b674b2da1e782575 (diff)
downloadrails-ac2bdd1dd31c8b89578ae7f490a898838b9ef6e0.tar.gz
rails-ac2bdd1dd31c8b89578ae7f490a898838b9ef6e0.tar.bz2
rails-ac2bdd1dd31c8b89578ae7f490a898838b9ef6e0.zip
adding an offset node
Diffstat (limited to 'lib/arel/nodes')
-rw-r--r--lib/arel/nodes/offset.rb11
-rw-r--r--lib/arel/nodes/select_statement.rb3
2 files changed, 13 insertions, 1 deletions
diff --git a/lib/arel/nodes/offset.rb b/lib/arel/nodes/offset.rb
new file mode 100644
index 0000000000..baa4068d93
--- /dev/null
+++ b/lib/arel/nodes/offset.rb
@@ -0,0 +1,11 @@
+module Arel
+ module Nodes
+ class Offset
+ attr_accessor :value
+
+ def initialize value
+ @value = value
+ end
+ end
+ end
+end
diff --git a/lib/arel/nodes/select_statement.rb b/lib/arel/nodes/select_statement.rb
index a96c02a545..6272fd126d 100644
--- a/lib/arel/nodes/select_statement.rb
+++ b/lib/arel/nodes/select_statement.rb
@@ -2,13 +2,14 @@ module Arel
module Nodes
class SelectStatement
attr_reader :cores
- attr_accessor :limit, :orders, :lock
+ attr_accessor :limit, :orders, :lock, :offset
def initialize cores = [SelectCore.new]
@cores = cores
@orders = []
@limit = nil
@lock = nil
+ @offset = nil
end
def initialize_copy other