From 3f92053a31bcc5d373f5671e727362d4ecc24cfc Mon Sep 17 00:00:00 2001 From: "hinto.janai" Date: Mon, 27 May 2024 20:17:20 -0400 Subject: [PATCH] `storage/database` -> `storage/key-value` --- storage/cuprate-database/Cargo.toml | 2 +- storage/{database => key-value}/Cargo.toml | 12 ++++++------ storage/{database => key-value}/README.md | 0 .../src/backend/heed/database.rs | 0 .../{database => key-value}/src/backend/heed/env.rs | 0 .../src/backend/heed/error.rs | 0 .../{database => key-value}/src/backend/heed/mod.rs | 0 .../src/backend/heed/storable.rs | 0 .../src/backend/heed/transaction.rs | 0 .../src/backend/heed/types.rs | 0 storage/{database => key-value}/src/backend/mod.rs | 0 .../src/backend/redb/database.rs | 0 .../{database => key-value}/src/backend/redb/env.rs | 0 .../src/backend/redb/error.rs | 0 .../{database => key-value}/src/backend/redb/mod.rs | 0 .../src/backend/redb/storable.rs | 0 .../src/backend/redb/transaction.rs | 0 .../src/backend/redb/types.rs | 0 storage/{database => key-value}/src/backend/tests.rs | 0 .../{database => key-value}/src/config/backend.rs | 0 storage/{database => key-value}/src/config/config.rs | 0 storage/{database => key-value}/src/config/mod.rs | 0 .../src/config/reader_threads.rs | 0 .../{database => key-value}/src/config/sync_mode.rs | 0 storage/{database => key-value}/src/constants.rs | 0 storage/{database => key-value}/src/database.rs | 0 storage/{database => key-value}/src/env.rs | 0 storage/{database => key-value}/src/error.rs | 0 storage/{database => key-value}/src/free.rs | 0 storage/{database => key-value}/src/key.rs | 0 storage/{database => key-value}/src/lib.rs | 0 storage/{database => key-value}/src/ops/block.rs | 0 .../{database => key-value}/src/ops/blockchain.rs | 0 storage/{database => key-value}/src/ops/key_image.rs | 0 storage/{database => key-value}/src/ops/macros.rs | 0 storage/{database => key-value}/src/ops/mod.rs | 0 storage/{database => key-value}/src/ops/output.rs | 0 storage/{database => key-value}/src/ops/property.rs | 0 storage/{database => key-value}/src/ops/tx.rs | 0 storage/{database => key-value}/src/resize.rs | 0 storage/{database => key-value}/src/service/free.rs | 0 storage/{database => key-value}/src/service/mod.rs | 0 storage/{database => key-value}/src/service/read.rs | 0 storage/{database => key-value}/src/service/tests.rs | 0 storage/{database => key-value}/src/service/types.rs | 0 storage/{database => key-value}/src/service/write.rs | 0 storage/{database => key-value}/src/storable.rs | 0 storage/{database => key-value}/src/table.rs | 0 storage/{database => key-value}/src/tables.rs | 0 storage/{database => key-value}/src/tests.rs | 0 storage/{database => key-value}/src/transaction.rs | 0 storage/{database => key-value}/src/types.rs | 0 .../{database => key-value}/src/unsafe_sendable.rs | 0 53 files changed, 7 insertions(+), 7 deletions(-) rename storage/{database => key-value}/Cargo.toml (89%) rename storage/{database => key-value}/README.md (100%) rename storage/{database => key-value}/src/backend/heed/database.rs (100%) rename storage/{database => key-value}/src/backend/heed/env.rs (100%) rename storage/{database => key-value}/src/backend/heed/error.rs (100%) rename storage/{database => key-value}/src/backend/heed/mod.rs (100%) rename storage/{database => key-value}/src/backend/heed/storable.rs (100%) rename storage/{database => key-value}/src/backend/heed/transaction.rs (100%) rename storage/{database => key-value}/src/backend/heed/types.rs (100%) rename storage/{database => key-value}/src/backend/mod.rs (100%) rename storage/{database => key-value}/src/backend/redb/database.rs (100%) rename storage/{database => key-value}/src/backend/redb/env.rs (100%) rename storage/{database => key-value}/src/backend/redb/error.rs (100%) rename storage/{database => key-value}/src/backend/redb/mod.rs (100%) rename storage/{database => key-value}/src/backend/redb/storable.rs (100%) rename storage/{database => key-value}/src/backend/redb/transaction.rs (100%) rename storage/{database => key-value}/src/backend/redb/types.rs (100%) rename storage/{database => key-value}/src/backend/tests.rs (100%) rename storage/{database => key-value}/src/config/backend.rs (100%) rename storage/{database => key-value}/src/config/config.rs (100%) rename storage/{database => key-value}/src/config/mod.rs (100%) rename storage/{database => key-value}/src/config/reader_threads.rs (100%) rename storage/{database => key-value}/src/config/sync_mode.rs (100%) rename storage/{database => key-value}/src/constants.rs (100%) rename storage/{database => key-value}/src/database.rs (100%) rename storage/{database => key-value}/src/env.rs (100%) rename storage/{database => key-value}/src/error.rs (100%) rename storage/{database => key-value}/src/free.rs (100%) rename storage/{database => key-value}/src/key.rs (100%) rename storage/{database => key-value}/src/lib.rs (100%) rename storage/{database => key-value}/src/ops/block.rs (100%) rename storage/{database => key-value}/src/ops/blockchain.rs (100%) rename storage/{database => key-value}/src/ops/key_image.rs (100%) rename storage/{database => key-value}/src/ops/macros.rs (100%) rename storage/{database => key-value}/src/ops/mod.rs (100%) rename storage/{database => key-value}/src/ops/output.rs (100%) rename storage/{database => key-value}/src/ops/property.rs (100%) rename storage/{database => key-value}/src/ops/tx.rs (100%) rename storage/{database => key-value}/src/resize.rs (100%) rename storage/{database => key-value}/src/service/free.rs (100%) rename storage/{database => key-value}/src/service/mod.rs (100%) rename storage/{database => key-value}/src/service/read.rs (100%) rename storage/{database => key-value}/src/service/tests.rs (100%) rename storage/{database => key-value}/src/service/types.rs (100%) rename storage/{database => key-value}/src/service/write.rs (100%) rename storage/{database => key-value}/src/storable.rs (100%) rename storage/{database => key-value}/src/table.rs (100%) rename storage/{database => key-value}/src/tables.rs (100%) rename storage/{database => key-value}/src/tests.rs (100%) rename storage/{database => key-value}/src/transaction.rs (100%) rename storage/{database => key-value}/src/types.rs (100%) rename storage/{database => key-value}/src/unsafe_sendable.rs (100%) diff --git a/storage/cuprate-database/Cargo.toml b/storage/cuprate-database/Cargo.toml index 712dbb1..2d67240 100644 --- a/storage/cuprate-database/Cargo.toml +++ b/storage/cuprate-database/Cargo.toml @@ -56,4 +56,4 @@ page_size = { version = "0.6.0" } tempfile = { version = "3.10.0" } pretty_assertions = { workspace = true } hex = { workspace = true } -hex-literal = { workspace = true } \ No newline at end of file +hex-literal = { workspace = true } diff --git a/storage/database/Cargo.toml b/storage/key-value/Cargo.toml similarity index 89% rename from storage/database/Cargo.toml rename to storage/key-value/Cargo.toml index 712dbb1..86dfa5f 100644 --- a/storage/database/Cargo.toml +++ b/storage/key-value/Cargo.toml @@ -1,12 +1,12 @@ [package] -name = "cuprate-database" -version = "0.0.0" +name = "key-value" +version = "0.1.0" edition = "2021" -description = "Cuprate's database abstraction" +description = "Key-value database abstraction" license = "MIT" authors = ["hinto-janai"] -repository = "https://github.com/Cuprate/cuprate/tree/main/database" -keywords = ["cuprate", "database"] +repository = "https://github.com/Cuprate/cuprate/tree/main/storage/storage" +keywords = ["storage", "database", "abstraction"] [features] default = ["heed", "redb", "service"] @@ -56,4 +56,4 @@ page_size = { version = "0.6.0" } tempfile = { version = "3.10.0" } pretty_assertions = { workspace = true } hex = { workspace = true } -hex-literal = { workspace = true } \ No newline at end of file +hex-literal = { workspace = true } diff --git a/storage/database/README.md b/storage/key-value/README.md similarity index 100% rename from storage/database/README.md rename to storage/key-value/README.md diff --git a/storage/database/src/backend/heed/database.rs b/storage/key-value/src/backend/heed/database.rs similarity index 100% rename from storage/database/src/backend/heed/database.rs rename to storage/key-value/src/backend/heed/database.rs diff --git a/storage/database/src/backend/heed/env.rs b/storage/key-value/src/backend/heed/env.rs similarity index 100% rename from storage/database/src/backend/heed/env.rs rename to storage/key-value/src/backend/heed/env.rs diff --git a/storage/database/src/backend/heed/error.rs b/storage/key-value/src/backend/heed/error.rs similarity index 100% rename from storage/database/src/backend/heed/error.rs rename to storage/key-value/src/backend/heed/error.rs diff --git a/storage/database/src/backend/heed/mod.rs b/storage/key-value/src/backend/heed/mod.rs similarity index 100% rename from storage/database/src/backend/heed/mod.rs rename to storage/key-value/src/backend/heed/mod.rs diff --git a/storage/database/src/backend/heed/storable.rs b/storage/key-value/src/backend/heed/storable.rs similarity index 100% rename from storage/database/src/backend/heed/storable.rs rename to storage/key-value/src/backend/heed/storable.rs diff --git a/storage/database/src/backend/heed/transaction.rs b/storage/key-value/src/backend/heed/transaction.rs similarity index 100% rename from storage/database/src/backend/heed/transaction.rs rename to storage/key-value/src/backend/heed/transaction.rs diff --git a/storage/database/src/backend/heed/types.rs b/storage/key-value/src/backend/heed/types.rs similarity index 100% rename from storage/database/src/backend/heed/types.rs rename to storage/key-value/src/backend/heed/types.rs diff --git a/storage/database/src/backend/mod.rs b/storage/key-value/src/backend/mod.rs similarity index 100% rename from storage/database/src/backend/mod.rs rename to storage/key-value/src/backend/mod.rs diff --git a/storage/database/src/backend/redb/database.rs b/storage/key-value/src/backend/redb/database.rs similarity index 100% rename from storage/database/src/backend/redb/database.rs rename to storage/key-value/src/backend/redb/database.rs diff --git a/storage/database/src/backend/redb/env.rs b/storage/key-value/src/backend/redb/env.rs similarity index 100% rename from storage/database/src/backend/redb/env.rs rename to storage/key-value/src/backend/redb/env.rs diff --git a/storage/database/src/backend/redb/error.rs b/storage/key-value/src/backend/redb/error.rs similarity index 100% rename from storage/database/src/backend/redb/error.rs rename to storage/key-value/src/backend/redb/error.rs diff --git a/storage/database/src/backend/redb/mod.rs b/storage/key-value/src/backend/redb/mod.rs similarity index 100% rename from storage/database/src/backend/redb/mod.rs rename to storage/key-value/src/backend/redb/mod.rs diff --git a/storage/database/src/backend/redb/storable.rs b/storage/key-value/src/backend/redb/storable.rs similarity index 100% rename from storage/database/src/backend/redb/storable.rs rename to storage/key-value/src/backend/redb/storable.rs diff --git a/storage/database/src/backend/redb/transaction.rs b/storage/key-value/src/backend/redb/transaction.rs similarity index 100% rename from storage/database/src/backend/redb/transaction.rs rename to storage/key-value/src/backend/redb/transaction.rs diff --git a/storage/database/src/backend/redb/types.rs b/storage/key-value/src/backend/redb/types.rs similarity index 100% rename from storage/database/src/backend/redb/types.rs rename to storage/key-value/src/backend/redb/types.rs diff --git a/storage/database/src/backend/tests.rs b/storage/key-value/src/backend/tests.rs similarity index 100% rename from storage/database/src/backend/tests.rs rename to storage/key-value/src/backend/tests.rs diff --git a/storage/database/src/config/backend.rs b/storage/key-value/src/config/backend.rs similarity index 100% rename from storage/database/src/config/backend.rs rename to storage/key-value/src/config/backend.rs diff --git a/storage/database/src/config/config.rs b/storage/key-value/src/config/config.rs similarity index 100% rename from storage/database/src/config/config.rs rename to storage/key-value/src/config/config.rs diff --git a/storage/database/src/config/mod.rs b/storage/key-value/src/config/mod.rs similarity index 100% rename from storage/database/src/config/mod.rs rename to storage/key-value/src/config/mod.rs diff --git a/storage/database/src/config/reader_threads.rs b/storage/key-value/src/config/reader_threads.rs similarity index 100% rename from storage/database/src/config/reader_threads.rs rename to storage/key-value/src/config/reader_threads.rs diff --git a/storage/database/src/config/sync_mode.rs b/storage/key-value/src/config/sync_mode.rs similarity index 100% rename from storage/database/src/config/sync_mode.rs rename to storage/key-value/src/config/sync_mode.rs diff --git a/storage/database/src/constants.rs b/storage/key-value/src/constants.rs similarity index 100% rename from storage/database/src/constants.rs rename to storage/key-value/src/constants.rs diff --git a/storage/database/src/database.rs b/storage/key-value/src/database.rs similarity index 100% rename from storage/database/src/database.rs rename to storage/key-value/src/database.rs diff --git a/storage/database/src/env.rs b/storage/key-value/src/env.rs similarity index 100% rename from storage/database/src/env.rs rename to storage/key-value/src/env.rs diff --git a/storage/database/src/error.rs b/storage/key-value/src/error.rs similarity index 100% rename from storage/database/src/error.rs rename to storage/key-value/src/error.rs diff --git a/storage/database/src/free.rs b/storage/key-value/src/free.rs similarity index 100% rename from storage/database/src/free.rs rename to storage/key-value/src/free.rs diff --git a/storage/database/src/key.rs b/storage/key-value/src/key.rs similarity index 100% rename from storage/database/src/key.rs rename to storage/key-value/src/key.rs diff --git a/storage/database/src/lib.rs b/storage/key-value/src/lib.rs similarity index 100% rename from storage/database/src/lib.rs rename to storage/key-value/src/lib.rs diff --git a/storage/database/src/ops/block.rs b/storage/key-value/src/ops/block.rs similarity index 100% rename from storage/database/src/ops/block.rs rename to storage/key-value/src/ops/block.rs diff --git a/storage/database/src/ops/blockchain.rs b/storage/key-value/src/ops/blockchain.rs similarity index 100% rename from storage/database/src/ops/blockchain.rs rename to storage/key-value/src/ops/blockchain.rs diff --git a/storage/database/src/ops/key_image.rs b/storage/key-value/src/ops/key_image.rs similarity index 100% rename from storage/database/src/ops/key_image.rs rename to storage/key-value/src/ops/key_image.rs diff --git a/storage/database/src/ops/macros.rs b/storage/key-value/src/ops/macros.rs similarity index 100% rename from storage/database/src/ops/macros.rs rename to storage/key-value/src/ops/macros.rs diff --git a/storage/database/src/ops/mod.rs b/storage/key-value/src/ops/mod.rs similarity index 100% rename from storage/database/src/ops/mod.rs rename to storage/key-value/src/ops/mod.rs diff --git a/storage/database/src/ops/output.rs b/storage/key-value/src/ops/output.rs similarity index 100% rename from storage/database/src/ops/output.rs rename to storage/key-value/src/ops/output.rs diff --git a/storage/database/src/ops/property.rs b/storage/key-value/src/ops/property.rs similarity index 100% rename from storage/database/src/ops/property.rs rename to storage/key-value/src/ops/property.rs diff --git a/storage/database/src/ops/tx.rs b/storage/key-value/src/ops/tx.rs similarity index 100% rename from storage/database/src/ops/tx.rs rename to storage/key-value/src/ops/tx.rs diff --git a/storage/database/src/resize.rs b/storage/key-value/src/resize.rs similarity index 100% rename from storage/database/src/resize.rs rename to storage/key-value/src/resize.rs diff --git a/storage/database/src/service/free.rs b/storage/key-value/src/service/free.rs similarity index 100% rename from storage/database/src/service/free.rs rename to storage/key-value/src/service/free.rs diff --git a/storage/database/src/service/mod.rs b/storage/key-value/src/service/mod.rs similarity index 100% rename from storage/database/src/service/mod.rs rename to storage/key-value/src/service/mod.rs diff --git a/storage/database/src/service/read.rs b/storage/key-value/src/service/read.rs similarity index 100% rename from storage/database/src/service/read.rs rename to storage/key-value/src/service/read.rs diff --git a/storage/database/src/service/tests.rs b/storage/key-value/src/service/tests.rs similarity index 100% rename from storage/database/src/service/tests.rs rename to storage/key-value/src/service/tests.rs diff --git a/storage/database/src/service/types.rs b/storage/key-value/src/service/types.rs similarity index 100% rename from storage/database/src/service/types.rs rename to storage/key-value/src/service/types.rs diff --git a/storage/database/src/service/write.rs b/storage/key-value/src/service/write.rs similarity index 100% rename from storage/database/src/service/write.rs rename to storage/key-value/src/service/write.rs diff --git a/storage/database/src/storable.rs b/storage/key-value/src/storable.rs similarity index 100% rename from storage/database/src/storable.rs rename to storage/key-value/src/storable.rs diff --git a/storage/database/src/table.rs b/storage/key-value/src/table.rs similarity index 100% rename from storage/database/src/table.rs rename to storage/key-value/src/table.rs diff --git a/storage/database/src/tables.rs b/storage/key-value/src/tables.rs similarity index 100% rename from storage/database/src/tables.rs rename to storage/key-value/src/tables.rs diff --git a/storage/database/src/tests.rs b/storage/key-value/src/tests.rs similarity index 100% rename from storage/database/src/tests.rs rename to storage/key-value/src/tests.rs diff --git a/storage/database/src/transaction.rs b/storage/key-value/src/transaction.rs similarity index 100% rename from storage/database/src/transaction.rs rename to storage/key-value/src/transaction.rs diff --git a/storage/database/src/types.rs b/storage/key-value/src/types.rs similarity index 100% rename from storage/database/src/types.rs rename to storage/key-value/src/types.rs diff --git a/storage/database/src/unsafe_sendable.rs b/storage/key-value/src/unsafe_sendable.rs similarity index 100% rename from storage/database/src/unsafe_sendable.rs rename to storage/key-value/src/unsafe_sendable.rs