sdb_service 0.3.5 → 0.3.6
Sign up to get free protection for your applications and to get access to all the features.
- data/README +4 -0
- data/lib/sdb_service/service.rb +10 -7
- metadata +3 -3
data/README
CHANGED
data/lib/sdb_service/service.rb
CHANGED
@@ -73,18 +73,21 @@ module SdbService
|
|
73
73
|
data_store.delete_attributes(self.database, id)
|
74
74
|
end
|
75
75
|
|
76
|
-
def query!(statement)
|
76
|
+
def query!(statement, limit = 30, token = nil)
|
77
77
|
stmt = statement.nil? ? "" : statement
|
78
|
-
data_store.query(self.database, stmt)
|
78
|
+
data_store.query(self.database, stmt, limit, token)
|
79
79
|
end
|
80
80
|
|
81
81
|
# this method allows you to query simple for raw information using its query language.
|
82
|
-
def query(statement)
|
83
|
-
|
84
|
-
|
85
|
-
|
82
|
+
def query(statement, limit = 30, token = nil)
|
83
|
+
response = Hash.new
|
84
|
+
response['results'] = Hash.new
|
85
|
+
query, token = self.query!(statement, limit, token)
|
86
|
+
query.each do |item_name|
|
87
|
+
response['results'][item_name] = self.get(item_name)
|
86
88
|
end
|
87
|
-
|
89
|
+
response['token'] = token unless token.nil?
|
90
|
+
return response
|
88
91
|
end
|
89
92
|
|
90
93
|
# this method returns all of the UUIDS stored in Amazon SimpleDB for the current domain.
|
metadata
CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 0
|
7
7
|
- 3
|
8
|
-
-
|
9
|
-
version: 0.3.
|
8
|
+
- 6
|
9
|
+
version: 0.3.6
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- Derek Perez
|
@@ -14,7 +14,7 @@ autorequire:
|
|
14
14
|
bindir: bin
|
15
15
|
cert_chain: []
|
16
16
|
|
17
|
-
date: 2010-05-
|
17
|
+
date: 2010-05-27 00:00:00 -07:00
|
18
18
|
default_executable:
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|