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.
Files changed (3) hide show
  1. data/README +4 -0
  2. data/lib/sdb_service/service.rb +10 -7
  3. metadata +3 -3
data/README CHANGED
@@ -1,5 +1,9 @@
1
1
  SDBService Gem - even simpler wrapper around aws_sdb, with builtin serialization.
2
2
 
3
+
4
+ debug: irb -rubygems -I lib -r sdb_service
5
+
6
+
3
7
  The MIT License
4
8
 
5
9
  Copyright (c) 2010 Derek Perez (derek@derkeperez.com) | Caring.com
@@ -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
- results = Hash.new
84
- self.query!(statement)[0].each do |item_name|
85
- results[item_name] = self.get(item_name)
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
- return results
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
- - 5
9
- version: 0.3.5
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-13 00:00:00 -07:00
17
+ date: 2010-05-27 00:00:00 -07:00
18
18
  default_executable:
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency