public
Description: Amazon Web Services SimpleDB for Ruby
Homepage: http://rubyforge.org/projects/aws-sdb/
Clone URL: git://github.com/dysinger/aws-sdb.git
Changed some variable names - minor stuffs


git-svn-id: svn+ssh://rubyforge.org/var/svn/aws-sdb/trunk/aws-sdb@12 
b47d895a-97fd-408b-8300-45b572025c09
dysinger (author)
Fri Jan 04 00:53:41 -0800 2008
commit  ca7c897f085fd07cc7ae6580cc2d060d510e42c7
tree    d515c40f89e10e18d2f180600e71d55ae01dd5b4
parent  bf6ba9a50c384d7b66c9544530e821a5295deeca
...
19
20
21
22
 
23
24
25
 
26
27
 
28
29
30
...
46
47
48
49
50
51
52
53
54
55
 
56
57
58
59
 
 
60
61
62
63
 
64
65
 
66
67
68
...
19
20
21
 
22
23
24
 
25
26
 
27
28
29
30
...
46
47
48
 
 
 
 
 
 
 
49
50
51
 
 
52
53
54
55
56
 
57
58
 
59
60
61
62
0
@@ -19,12 +19,12 @@ module AwsSdb
0
     end
0
     
0
     # TODO Make this options hash not a param list
0
- def list_domains(max_results = nil, more_token = nil)
0
+ def list_domains(max = nil, token = nil)
0
       params = { 'Action' => 'ListDomains' }
0
       params['MoreToken'] =
0
- more_token unless more_token.nil? || more_token.empty?
0
+ token unless token.nil? || token.empty?
0
       params['MaxResults'] =
0
- max_results.to_s unless max_results.nil? || max_results.to_i == 0
0
+ max.to_s unless max.nil? || max.to_i == 0
0
       doc = call(:get, params)
0
       results = []
0
       REXML::XPath.each(doc, '//DomainName/text()') do |domain|
0
@@ -46,23 +46,17 @@ module AwsSdb
0
       nil
0
     end
0
     
0
- def query(
0
- domain_name,
0
- query_expression,
0
- sort = nil,
0
- max_results = nil,
0
- more_token = nil
0
- )
0
+ def query(domain, query, sort = nil, max = nil, token = nil)
0
       params = {
0
         'Action' => 'Query',
0
- 'QueryExpression' => query_expression,
0
- 'DomainName' => domain_name.to_s
0
+ 'QueryExpression' => query,
0
+ 'DomainName' => domain.to_s
0
       }
0
       params['Sort'] = sort unless sort.nil? || sort.empty?
0
       params['MoreToken'] =
0
- more_token unless more_token.nil? || more_token.empty?
0
+ token unless token.nil? || token.empty?
0
       params['MaxResults'] =
0
- max_results.to_s unless max_results.nil? || max_results.to_i != 0
0
+ max.to_s unless max.nil? || max.to_i != 0
0
       doc = call(:get, params)
0
       results = []
0
       REXML::XPath.each(doc, '//ItemName/text()') do |item|

Comments

    No one has commented yet.