sdb_service 0.3.2 → 0.3.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. data/lib/sdb_service/service.rb +12 -7
  2. metadata +3 -3
@@ -73,24 +73,29 @@ module SdbService
73
73
  data_store.delete_attributes(self.database, id)
74
74
  end
75
75
 
76
+ def query!(statement)
77
+ stmt = statement.nil? ? "" : "[#{statement}]"
78
+ data_store.query(self.database, stmt)
79
+ end
80
+
76
81
  # this method allows you to query simple for raw information using its query language.
77
82
  def query(statement)
78
- data_store.query(self.database, statement)
83
+ results = Hash.new
84
+ self.query!(statement)[0].each do |item_name|
85
+ results[item_name] = self.get(item_name)
86
+ end
87
+ return results
79
88
  end
80
89
 
81
90
  # this method returns all of the UUIDS stored in Amazon SimpleDB for the current domain.
82
91
  def all!
83
- self.query("")
92
+ self.query!(nil)
84
93
  end
85
94
 
86
95
  # this method returns all of the fully qualified, and deserialized objects stored in Amazon
87
96
  # SimpleDB for the current domain.
88
97
  def all
89
- results = Hash.new
90
- self.all![0].each do |item_name|
91
- results[item_name] = self.get(item_name)
92
- end
93
- return results
98
+ self.query(nil)
94
99
  end
95
100
 
96
101
  # this method returns a list of all databases associated with this AWS account.
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 3
8
- - 2
9
- version: 0.3.2
8
+ - 3
9
+ version: 0.3.3
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-04 00:00:00 -07:00
17
+ date: 2010-05-12 00:00:00 -07:00
18
18
  default_executable:
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency