From 3b9e56451aca1fefa82bf6a4e2cdcc1390df8f17 Mon Sep 17 00:00:00 2001 From: Philippe PITTOLI Date: Wed, 22 May 2024 18:38:26 +0200 Subject: [PATCH] s/Indexer/Index/ --- src/dodb/{indexer.cr => index.cr} | 4 ++-- src/dodb/index/directed_graph.cr | 2 +- src/dodb/index/index.cr | 2 +- src/dodb/index/partition.cr | 2 +- src/dodb/index/tags.cr | 2 +- src/dodb/storage.cr | 2 +- src/dodb/storage/cached.cr | 2 +- 7 files changed, 8 insertions(+), 8 deletions(-) rename src/dodb/{indexer.cr => index.cr} (91%) diff --git a/src/dodb/indexer.cr b/src/dodb/index.cr similarity index 91% rename from src/dodb/indexer.cr rename to src/dodb/index.cr index d4a9cbd..4d2613b 100644 --- a/src/dodb/indexer.cr +++ b/src/dodb/index.cr @@ -1,6 +1,6 @@ -# Abstract class `DODB::Indexer(V)` represents the specifications for +# Abstract class `DODB::Index(V)` represents the specifications for # the indexes (basic indexes, partitions, tags, etc.). -abstract class DODB::Indexer(V) +abstract class DODB::Index(V) # Indexes a value, used for **internal operations**. # diff --git a/src/dodb/index/directed_graph.cr b/src/dodb/index/directed_graph.cr index 8b065aa..7bb9c23 100644 --- a/src/dodb/index/directed_graph.cr +++ b/src/dodb/index/directed_graph.cr @@ -3,7 +3,7 @@ require "json" # WARNING: this code hasn't been reviewed nor used in years. -class DODB::Index::DirectedGraph(V) < DODB::Indexer(V) +class DODB::Index::DirectedGraph(V) < DODB::Index(V) property name : String property key_proc : Proc(V, Array(String)) getter storage_root : String diff --git a/src/dodb/index/index.cr b/src/dodb/index/index.cr index ed573dc..0d9ab22 100644 --- a/src/dodb/index/index.cr +++ b/src/dodb/index/index.cr @@ -27,7 +27,7 @@ require "file_utils" # NOTE: no cache, thus considered as *slow* for creation, deletion **and retrieval**. # NOTE: see `CachedIndex` for a cached version, faster for retrieval. # NOTE: for fast operations without fs representation, see `RAMOnlyIndex`. -class DODB::Index::Index(V) < DODB::Indexer(V) +class DODB::Index::Index(V) < DODB::Index(V) # Name of the index, such as *id* or *color* for example. # This is an arbitrary value, mostly to create the index directory. # diff --git a/src/dodb/index/partition.cr b/src/dodb/index/partition.cr index 49c5fe7..1b244d6 100644 --- a/src/dodb/index/partition.cr +++ b/src/dodb/index/partition.cr @@ -30,7 +30,7 @@ require "file_utils" # NOTE: no cache, thus considered as *slow* for creation, deletion **and retrieval**. # NOTE: see `CachedPartition` for a cached version, faster for retrieval. # NOTE: for fast operations without fs representation, see `RAMOnlyPartition`. -class DODB::Index::Partition(V) < DODB::Indexer(V) +class DODB::Index::Partition(V) < DODB::Index(V) # Name of the index, such as *color* for example. # This is an arbitrary value, mostly to create the index directory. # diff --git a/src/dodb/index/tags.cr b/src/dodb/index/tags.cr index 20cfd36..8dc819f 100644 --- a/src/dodb/index/tags.cr +++ b/src/dodb/index/tags.cr @@ -31,7 +31,7 @@ require "file_utils" # NOTE: no cache, thus considered as *slow* for creation, deletion **and retrieval**. # NOTE: see `CachedTags` for a cached version, faster for retrieval. # NOTE: for fast operations without fs representation, see `RAMOnlyTags`. -class DODB::Index::Tags(V) < DODB::Indexer(V) +class DODB::Index::Tags(V) < DODB::Index(V) # Name of the index, such as *keywords* for example. # This is an arbitrary value, mostly to create the index directory. # diff --git a/src/dodb/storage.cr b/src/dodb/storage.cr index f5733b6..2d8d277 100644 --- a/src/dodb/storage.cr +++ b/src/dodb/storage.cr @@ -1,7 +1,7 @@ # The `DODB::Storage` abstract class defines the specifications of # subsequent DODB databases (uncached, cached, RAM-only, etc.). abstract class DODB::Storage(V) - @indexers = [] of Indexer(V) + @indexers = [] of Index(V) property directory_name : String # Creates a database. diff --git a/src/dodb/storage/cached.cr b/src/dodb/storage/cached.cr index 9f18a38..ea799c1 100644 --- a/src/dodb/storage/cached.cr +++ b/src/dodb/storage/cached.cr @@ -37,7 +37,7 @@ end # # WARNING: beware of the RAM use, see `DODB::Storage::Stacked` for a less memory-hungry option. class DODB::Storage::Cached(V) < DODB::Storage(V) - @indexers = [] of Indexer(V) + @indexers = [] of Index(V) property data = Hash(Int32, V).new def initialize(@directory_name : String)