2010-03-14 20:11:43 -07:00
|
|
|
module Fog
|
|
|
|
module AWS
|
2010-09-03 01:11:45 -07:00
|
|
|
class SimpleDB
|
2010-03-14 20:11:43 -07:00
|
|
|
class Real
|
2010-02-01 22:53:18 -08:00
|
|
|
|
2010-06-12 15:31:17 -07:00
|
|
|
require 'fog/aws/parsers/simpledb/select'
|
|
|
|
|
2010-02-01 22:53:18 -08: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-15 21:58:57 -07:00
|
|
|
request(
|
|
|
|
'Action' => 'Select',
|
|
|
|
'NextToken' => next_token,
|
|
|
|
'SelectExpression' => select_expression,
|
2011-01-03 18:55:24 -08:00
|
|
|
:idempotent => true,
|
2010-03-15 21:58:57 -07:00
|
|
|
:parser => Fog::Parsers::AWS::SimpleDB::Select.new(@nil_string)
|
|
|
|
)
|
2010-02-01 22:53:18 -08:00
|
|
|
end
|
|
|
|
|
2009-07-13 19:14:59 -07:00
|
|
|
end
|
|
|
|
|
2010-03-14 20:11:43 -07:00
|
|
|
class Mock
|
2010-02-01 22:53:18 -08:00
|
|
|
|
|
|
|
def select(select_expression, next_token = nil)
|
2010-05-26 17:38:23 -07:00
|
|
|
Fog::Mock.not_implemented
|
2010-02-01 22:53:18 -08:00
|
|
|
end
|
|
|
|
|
|
|
|
end
|
2009-07-13 19:14:59 -07:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|