2010-03-14 23:11:43 -04:00
|
|
|
module Fog
|
|
|
|
module AWS
|
2010-09-03 04:11:45 -04:00
|
|
|
class SimpleDB
|
2010-03-14 23:11:43 -04:00
|
|
|
class Real
|
2010-02-02 01:53:18 -05:00
|
|
|
|
2010-06-12 18:31:17 -04:00
|
|
|
require 'fog/aws/parsers/simpledb/select'
|
|
|
|
|
2010-02-02 01:53:18 -05:00
|
|
|
# Select item data from SimpleDB
|
|
|
|
#
|
|
|
|
# ==== Parameters
|
|
|
|
# * select_expression<~String> - Expression to query domain with.
|
|
|
|
# * next_token<~String> - Offset token to start list, defaults to nil.
|
|
|
|
#
|
|
|
|
# ==== Returns
|
|
|
|
# * response<~Excon::Response>:
|
|
|
|
# * body<~Hash>:
|
|
|
|
# * 'BoxUsage'<~Float>
|
|
|
|
# * 'RequestId'<~String>
|
|
|
|
# * 'Items'<~Hash> - list of attribute name/values for the items formatted as
|
|
|
|
# { 'item_name' => { 'attribute_name' => ['attribute_value'] }}
|
|
|
|
# * 'NextToken'<~String> - offset to start with if there are are more domains to list
|
|
|
|
def select(select_expression, next_token = nil)
|
2010-03-16 00:58:57 -04:00
|
|
|
request(
|
|
|
|
'Action' => 'Select',
|
|
|
|
'NextToken' => next_token,
|
|
|
|
'SelectExpression' => select_expression,
|
|
|
|
:parser => Fog::Parsers::AWS::SimpleDB::Select.new(@nil_string)
|
|
|
|
)
|
2010-02-02 01:53:18 -05:00
|
|
|
end
|
|
|
|
|
2009-07-13 22:14:59 -04:00
|
|
|
end
|
|
|
|
|
2010-03-14 23:11:43 -04:00
|
|
|
class Mock
|
2010-02-02 01:53:18 -05:00
|
|
|
|
|
|
|
def select(select_expression, next_token = nil)
|
2010-05-26 20:38:23 -04:00
|
|
|
Fog::Mock.not_implemented
|
2010-02-02 01:53:18 -05:00
|
|
|
end
|
|
|
|
|
|
|
|
end
|
2009-07-13 22:14:59 -04:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|