synor/crates/synor-database/Cargo.toml
Gulshan Yadav 8da34bc73d feat(database): add SQL, Graph, and Raft Replication modules
- SQL store with SQLite-compatible subset (sqlparser 0.43)
  - CREATE TABLE, INSERT, SELECT, UPDATE, DELETE
  - WHERE clauses, ORDER BY, LIMIT
  - Aggregates (COUNT, SUM, AVG, MIN, MAX)
  - UNIQUE and NOT NULL constraints
  - BTreeMap-based indexes

- Graph store for relationship-based queries
  - Nodes with labels and properties
  - Edges with types and weights
  - BFS/DFS traversal
  - Dijkstra shortest path
  - Cypher-like query parser (MATCH, CREATE, DELETE, SET)

- Raft consensus replication for high availability
  - Leader election with randomized timeouts
  - Log replication with AppendEntries RPC
  - Snapshot management for log compaction
  - Cluster configuration and joint consensus
  - Full RPC message serialization

All 159 tests pass.
2026-01-10 19:32:14 +05:30

47 lines
979 B
TOML

[package]
name = "synor-database"
version.workspace = true
edition.workspace = true
description = "Multi-model database layer for Synor blockchain"
license.workspace = true
[dependencies]
# Internal crates
synor-types = { path = "../synor-types" }
synor-crypto = { path = "../synor-crypto" }
synor-storage = { path = "../synor-storage" }
# Serialization
serde.workspace = true
serde_json.workspace = true
borsh.workspace = true
bincode = "1.3"
# Utilities
thiserror.workspace = true
parking_lot.workspace = true
tracing.workspace = true
hex.workspace = true
# Hashing
blake3.workspace = true
# Async
tokio = { workspace = true, features = ["sync", "rt-multi-thread", "net"] }
# Data structures
lru = "0.12"
indexmap = "2.2"
# HTTP Gateway
axum.workspace = true
tower-http = { version = "0.5", features = ["cors", "trace"] }
# SQL parsing
sqlparser = "0.43"
# Vector operations (for AI/RAG)
# Using pure Rust for portability
[dev-dependencies]
tempfile.workspace = true