@luvra/luvsql
v0.4.2
Published
A lightweight, TypeScript-based relational database with SQL-like syntax and optional JSON persistence.
Maintainers
Readme
LuvSQL: A Modern, Lightweight Relational Database Framework
Overview
LuvSQL is a next-generation relational database framework designed for full-stack developers, emphasizing simplicity, security, and performance. Built in TypeScript, it provides a human-friendly query syntax while maintaining core relational features like schemas, CRUD operations, and expressive filtering. Ideal for prototyping, edge computing, and integration with frameworks like Next.js, LuvSQL is secure-by-default with built-in validation and sanitization.
Key Pillars:
- Developer-Friendly Syntax: Verb-noun commands (e.g.,
STORE|ENTRY) for intuitive querying. - Security-First: Input sanitization, type enforcement, and configurable encryption/RBAC.
- Lightweight & Extensible: In-memory core with persistence hooks; AST-based for custom extensions.
- Performance: Fast in-memory operations for small/medium datasets.
LuvSQL is not a full production DB yet (e.g., persistence is configurable but unimplemented), but it's a strong foundation for modern web apps.
Fundamentals
LuvSQL models data as:
- BluePrint: Database schema containing Canvases (tables).
- Canvas: Table with verticalPanels (columns) and horizontalPanels (rows).
- Queries: Parsed to AST, validated, and executed via a modular engine.
Supported Features:
- Schema Definition: Types (INTEGER, TEXT, etc.), nullability, defaults, primaries.
- CRUD: Store, Retrieve (with WHERE, ORDER BY, LIMIT), Refine (update), Erase.
- Expressions: Binary/logical operators, LIKE, params for prepared statements.
- Validation: Runtime checks for types, identifiers, and safety.
Getting Started
Installation
git clone https://github.com/your-repo/luvsql.git
cd luvsql
npm install
npm run build