Skip to content

Commit

Permalink
view_storage: fixed @skiplist var name
Browse files Browse the repository at this point in the history
  • Loading branch information
Oleg Andreev committed Apr 27, 2008
1 parent 3c86606 commit 7d7c66e
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions lib/strokedb/views/view_storage.rb
Expand Up @@ -19,13 +19,13 @@ def set_options(options)

#
#
def oleganza_find(start_key, end_key, limit, offset, reverse, with_keys)
def find(start_key, end_key, limit, offset, reverse, with_keys)
@list.search(start_key, end_key, limit, offset, reverse, with_keys)
end

#
#
def find(start_key, end_key, key, limit, offset, reverse, with_keys)
def find_(start_key, end_key, key, limit, offset, reverse, with_keys)
start_key = end_key = key if start_key.nil? && end_key.nil?
# Please note that below algorithm will most probably be eventually replaced by a new skiplist Oleg Andreev works on currently
start_key = @list.first_key unless start_key
Expand Down Expand Up @@ -54,7 +54,7 @@ def find(start_key, end_key, key, limit, offset, reverse, with_keys)
def replace(old_pairs, new_pairs)
old_pairs.each do |pair|
key, value = pair
@skiplist.insert(key,nil) if @skiplist.find(key)
@list.insert(key,nil) if @list.find(key)
end
insert(new_pairs)
end
Expand All @@ -64,7 +64,7 @@ def replace(old_pairs, new_pairs)
def insert(new_pairs)
new_pairs.each do |pair|
key, value = pair
@skiplist.insert(key, value)
@list.insert(key, value)
end
end

Expand All @@ -77,11 +77,11 @@ def exists?
#
#
def clear!
@skiplist = SimpleSkiplist.new
@list = SimpleSkiplist.new
end

def empty?
@skiplist.empty?
@list.empty?
end

end
Expand Down

0 comments on commit 7d7c66e

Please sign in to comment.