#afot #OverDriveDb #InCodeSDK #EmbeddedDB
What is OverDrive?
OverDrive is an embeddable, zero-config document database for Rust, Python, Node.js, Java, Go, and C/C++. It stores JSON documents, supports SQL queries, full-text search, secondary indexing, and ACID transactions โ all within a single library. No external server. No network. Just a file.
| Feature | Description |
|---|---|
| ๐๏ธ Zero-config | Open a file, start querying โ no setup, no config files |
| ๐ JSON Native | Store, query, and index JSON documents directly |
| ๐ SQL Queries | SELECT, INSERT, UPDATE, DELETE with WHERE, ORDER BY, LIMIT |
| ๐ Aggregations | COUNT, SUM, AVG, MIN, MAX, GROUP BY |
| ๐ Full-text Search | Built-in text search across documents |
| ๐ณ B-Tree Indexes | Secondary indexes for fast lookups |
| ๐ ACID Transactions | Reliable, consistent data operations |
| ๐๏ธ Compression | zstd compression for efficient storage |
| ๐ Encryption | AES-256-GCM at-rest encryption |
| ๐ก๏ธ Security Hardened | Key from env vars, querySafe() injection blocking, auto chmod 600, WAL cleanup, thread-safe wrappers |
| ๐ RAM Engine | Sub-microsecond in-memory storage with snapshot/restore |
| ๐ญ Watchdog | File integrity monitoring โ detect corruption before it matters |
| ๐ Cross-platform | Windows x64, Linux x64/ARM64, macOS x64/ARM64 |
| ๐ Multi-language | Rust, Python, Node.js, Java, Go, C/C++ |
Quick Start
Install
Python:
Node.js:
Java (Maven):
com.afot
overdrive-db
1.4.0
Go:
Rust:
[]
= "1.4.0"
Note: The Rust crate dynamically loads the prebuilt native library at runtime. Download
overdrive.dll/liboverdrive.so/liboverdrive.dylibfrom GitHub Releases and place it in your project directory.
Hello World โ 3 Lines
Python
=
# table auto-created
Node.js
const = require;
const db = ;
db.; // table auto-created
console.log;
db.;
Java
;
try
Go
db, _ := overdrive.Open("myapp.odb")
defer db.Close()
db.Insert("users", map[string]any)
result, _ := db.Query("SELECT * FROM users")
fmt.Println(result.Rows)
Rust
use OverDriveDB;
let mut db = open.unwrap;
db.create_table.unwrap;
let id = db.insert.unwrap;
let result = db.query.unwrap;
println!;
db.close.unwrap;
v1.4.0 โ What's New
Password-protected databases
=
RAM engine for sub-microsecond caching
=
# persist to disk
= # {"bytes": ..., "mb": ..., "percent": ...}
File integrity monitoring
=
Transaction callbacks
= # auto-commits on success, auto-rolls back on exception
Helper methods
=
=
=
=
=
=
All 6 Storage Engines
| Engine | Use Case | Latency |
|---|---|---|
Disk (default) |
General-purpose persistent storage | ~1ms |
RAM |
Caching, sessions, leaderboards | <1ยตs |
Vector |
Similarity search, embeddings | ~5ms |
Time-Series |
Metrics, IoT, logs | ~2ms |
Graph |
Social networks, knowledge graphs | ~3ms |
Streaming |
Event queues, message brokers | ~1ms |
# Select engine on open
=
# Or per-table
=
# this table in RAM
# this table on disk (auto-created)
Security
| Feature | Description |
|---|---|
open(path, password=...) |
AES-256-GCM encryption via Argon2id key derivation |
openEncrypted(path, "ODB_KEY") |
Key from environment variable โ never hardcoded |
querySafe(sql, params) |
SQL injection prevention with parameterized queries |
backup(dest) |
Encrypted backup + permission hardening |
cleanupWal() |
Delete WAL after commit โ prevents replay attacks |
Auto on open() |
chmod 600 / Windows ACL on every database file |
# Never hardcode passwords โ use environment variables
=
# Or use the env-var method
=
# Safe parameterized queries
=
Downloads
| Platform | File |
|---|---|
| Windows x64 | overdrive.dll |
| Linux x64 | liboverdrive.so |
| Linux ARM64 | liboverdrive-arm64.so |
| macOS x64 | liboverdrive.dylib |
| macOS ARM64 | liboverdrive-arm64.dylib |
Documentation
| Resource | Link |
|---|---|
| ๐ Quick Start | docs/quickstart.md |
| ๐ API Reference | docs/api-reference.md |
| ๐ Migration Guide | docs/migration-v1.3-to-v1.4.md |
| ๐ Security Guide | docs/security.md |
| ๐ Python Guide | docs/python-guide.md |
| ๐จ Node.js Guide | docs/nodejs-guide.md |
| โ Java Guide | docs/java-guide.md |
| ๐น Go Guide | docs/go-guide.md |
| ๐ป Examples | examples/ |
Project Structure
OverDrive-DB_IncodeSDK/
โโโ Cargo.toml # Rust crate (dynamic loader)
โโโ README.md # This file
โโโ LICENSE
โ
โโโ src/
โ โโโ lib.rs # OverDriveDB Rust API
โ โโโ dynamic.rs # Runtime native library loader
โ โโโ ffi.rs # C FFI exports
โ โโโ shared.rs # Thread-safe SharedDB wrapper
โ โโโ query_engine.rs # SQL query types
โ โโโ result.rs # Error types
โ
โโโ python/overdrive/
โ โโโ __init__.py # Python SDK (ctypes)
โ
โโโ nodejs/
โ โโโ index.js # Node.js SDK (koffi)
โ โโโ index.d.ts # TypeScript definitions
โ
โโโ java/src/
โ โโโ .../OverDrive.java # Java SDK (JNA)
โ
โโโ go/
โ โโโ overdrive.go # Go SDK (CGo)
โ
โโโ c/include/
โ โโโ overdrive.h # C/C++ header
โ
โโโ docs/ # Full documentation
โโโ examples/ # Working code examples
โโโ .github/workflows/ # CI/CD pipelines
Comparison
| Feature | OverDrive | SQLite | MongoDB | Redis |
|---|---|---|---|---|
| Deployment | Library | Library | Server | Server |
| Data Model | JSON Documents | Relational | JSON Documents | Key-Value |
| SQL Support | โ | โ | โ | โ |
| Schema | Optional | Required | Optional | None |
| Full-text Search | โ Built-in | FTS5 Extension | โ | โ |
| Encryption | โ AES-256 | SEE (paid) | โ Enterprise | โ |
| RAM Engine | โ | โ | โ | โ |
| Watchdog | โ | โ | โ | โ |
| Size | ~3MB | ~1.2MB | ~200MB | ~3MB |
Links
| Resource | URL |
|---|---|
| ๐ฆ Releases | GitHub Releases |
| ๐ Issues | GitHub Issues |
| ๐ฌ Discussions | GitHub Discussions |
| ๐ Homepage | overdrive-db.com |
| ๐ฆ npm | npmjs.com/package/overdrive-db |
| ๐ PyPI | pypi.org/project/overdrive-db |
License
Licensed under either of:
at your option.
#afot #OverDriveDb #InCodeSDK #EmbeddedDB #MrV2K #AllForOneTech #HybridDB