Skip to content
Browse files

get_indexed_slices: key_start -> start_key (for API consistency)

  • Loading branch information...
1 parent 832d743 commit 5b3e835797a729f3680875ebdc0660069e5925a9 @mcmire committed Aug 4, 2012
Showing with 4 additions and 4 deletions.
  1. +4 −4 lib/cassandra/cassandra.rb
View
8 lib/cassandra/cassandra.rb
@@ -954,7 +954,7 @@ def create_index_clause(index_expressions, start = "", count = 100)
##
# This method is used to query a secondary index with a set of
- # provided search parameters
+ # provided search parameters.
#
# Please note that you can either specify a
# CassandraThrift::IndexClause or an array of hashes with the
@@ -967,22 +967,22 @@ def create_index_clause(index_expressions, start = "", count = 100)
# * :comparison - Type of comparison to do.
# * options
# * :key_count - Set maximum number of rows to return. (Only works if CassandraThrift::IndexClause is not passed in.)
- # * :key_start - Set starting row key for search. (Only works if CassandraThrift::IndexClause is not passed in.)
+ # * :start_key - Set starting row key for search. (Only works if CassandraThrift::IndexClause is not passed in.)
# * :consistency
#
# TODO: Supercolumn support.
def get_indexed_slices(column_family, index_clause, *columns_and_options)
return false if Cassandra.VERSION.to_f < 0.7
column_family, columns, _, options =
- extract_and_validate_params(column_family, [], columns_and_options, READ_DEFAULTS.merge(:key_count => 100, :key_start => ""))
+ extract_and_validate_params(column_family, [], columns_and_options, READ_DEFAULTS.merge(:key_count => 100, :start_key => ""))
if index_clause.class != CassandraThrift::IndexClause
index_expressions = index_clause.collect do |expression|
create_index_expression(expression[:column_name], expression[:value], expression[:comparison])
end
- index_clause = create_index_clause(index_expressions, options[:key_start], options[:key_count])
+ index_clause = create_index_clause(index_expressions, options[:start_key], options[:key_count])
end
key_slices = _get_indexed_slices(column_family, index_clause, columns, options[:count], options[:start],

0 comments on commit 5b3e835

Please sign in to comment.
Something went wrong with that request. Please try again.