app/cms/scrivito/backend/index.rb in scrivito_sdk-1.17.0 vs app/cms/scrivito/backend/index.rb in scrivito_sdk-1.18.0.rc1
- old
+ new
@@ -1,9 +1,8 @@
module Scrivito
module Backend
-# Abstract Base for Index Implementations
module Index
IMPLEMENTATIONS = [
Backend::PathIndex,
Backend::ParentPathIndex,
@@ -15,49 +14,9 @@
end
def self.by_name(name)
IMPLEMENTATION_BY_NAME[name.to_s] or
raise Scrivito::InternalError, "unknown index #{name}"
- end
-
- def id
- abstract_base_method
- end
-
- def update(key, cached_result, change_index)
- updated = Set.new(cached_result)
-
- change_index.each do |id, data|
- value = extract_update_value_from_data(data)
-
- if value == key
- updated.add(id)
- else
- updated.delete(id)
- end
- end
-
- updated.to_a
- end
-
- def extract_update_value_from_data(data)
- abstract_base_method
- end
-
- def group_by(keys, obj_datas)
- return [obj_datas] if keys.length == 1
-
- group_by_multiple(keys, obj_datas)
- end
-
- def group_by_multiple(parent_paths, obj_datas)
- abstract_base_method
- end
-
- private
-
- def abstract_base_method
- raise Scrivito::InternalError, "not implemented"
end
end
end