lib/ddbcli/ddb-driver.rb in ddbcli-0.2.0 vs lib/ddbcli/ddb-driver.rb in ddbcli-0.2.1

- old
+ new

@@ -420,13 +420,17 @@ req_hash = {'TableName' => parsed.table} req_hash['AttributesToGet'] = parsed.attrs unless parsed.attrs.empty? req_hash['Limit'] = parsed.limit if parsed.limit req_hash['ExclusiveStartKey'] = last_evaluated_key if last_evaluated_key - if action == 'Query' + case action + when 'Query' req_hash['ConsistentRead'] = @consistent if @consistent req_hash['IndexName'] = parsed.index if parsed.index req_hash['ScanIndexForward'] = parsed.order_asc unless parsed.order_asc.nil? + when 'Scan' + req_hash['Segment'] = parsed.segment if parsed.segment + req_hash['TotalSegments'] = parsed.total_segments if parsed.total_segments end # XXX: req_hash['ReturnConsumedCapacity'] = ... if parsed.count