activerecord-simpledb-adapter 0.4.2 → 0.4.3
Sign up to get free protection for your applications and to get access to all the features.
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{activerecord-simpledb-adapter}
|
8
|
-
s.version = "0.4.
|
8
|
+
s.version = "0.4.3"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Ilia Ablamonov", "Alex Gorkunov", "Cloud Castle Inc."]
|
12
|
-
s.date = %q{2011-04-
|
12
|
+
s.date = %q{2011-04-26}
|
13
13
|
s.email = %q{ilia@flamefork.ru}
|
14
14
|
s.extra_rdoc_files = [
|
15
15
|
"LICENSE.txt",
|
@@ -172,9 +172,9 @@ module ActiveRecord
|
|
172
172
|
first_query = sql.gsub(/LIMIT\s+\d+/, "LIMIT #{sql.offset}")
|
173
173
|
first_query.gsub!(/SELECT(.+?)FROM/, "SELECT COUNT(*) FROM")
|
174
174
|
log first_query, "SimpleDB (offset partial)" do
|
175
|
-
response = @connection.select(first_query, nil, false)
|
175
|
+
response = @connection.select(first_query, nil, false)
|
176
176
|
end
|
177
|
-
response = @connection.select(sql, response[:
|
177
|
+
response = @connection.select(sql, response[:next_token], true)
|
178
178
|
else
|
179
179
|
response = @connection.select(sql, nil, true)
|
180
180
|
end
|
@@ -14,8 +14,11 @@ describe "SimpleDBAdapter ActiveRecord offset operation" do
|
|
14
14
|
end
|
15
15
|
|
16
16
|
it "should work" do
|
17
|
-
|
18
|
-
|
17
|
+
count, offset = 10, 20
|
18
|
+
persons = Person.limit(count).offset(offset).all
|
19
|
+
persons.count.should == count
|
20
|
+
persons.each_with_index do |person, i|
|
21
|
+
person.login.should == "login#{i + offset}"
|
19
22
|
end
|
20
23
|
end
|
21
24
|
end
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: activerecord-simpledb-adapter
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 9
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 4
|
9
|
-
-
|
10
|
-
version: 0.4.
|
9
|
+
- 3
|
10
|
+
version: 0.4.3
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Ilia Ablamonov
|
@@ -17,7 +17,7 @@ autorequire:
|
|
17
17
|
bindir: bin
|
18
18
|
cert_chain: []
|
19
19
|
|
20
|
-
date: 2011-04-
|
20
|
+
date: 2011-04-26 00:00:00 +04:00
|
21
21
|
default_executable:
|
22
22
|
dependencies:
|
23
23
|
- !ruby/object:Gem::Dependency
|