How ugurturkerkebeci/mergendb works
MergenDB is an embedded columnar and vector database with Python and Node.js interfaces, SQL analytics, ingestion/export, and an optional HTTP management server. The main workflow is an application using the client API to write or query a table: writes are encoded into the single-file format, while queries are parsed and executed against stored blocks. CLI, server, Studio, and SDK capabilities are included where documented. Some subsystems are represented from the README and source index rather than inspected implementation; those limits are reflected by omitted or unverified links.
Main entry points: client.py Table Operations · server.py HTTP Server · reader.py File Reader · importer.py Import
Components 23
Interfaces
- Python API
mergendb/client.py - Node.js SDK
sdks/nodejs/index.js - CLI and REPL
mergendb/cli/repl.py - Table Operations
mergendb/client.py
Query Engine
- SQL Parser
mergendb/query/parser.py - SQL Lexer
mergendb/query/lexer.py - Query AST
mergendb/query/ast_nodes.py - Query Planner
mergendb/query/planner.py - Query Executor
mergendb/query/engine.py - Vector Math
mergendb/core/vector_ops.py
Columnar Storage
- Schema and Types
mergendb/core/schema.py - File Writer
mergendb/storage/writer.py - File Reader
mergendb/storage/reader.py - Compression
mergendb/compression/compressor.py - Column Encodings
mergendb/compression/encodings.py - Block Metadata
mergendb/core/block.py
Data Operations
- Import
mergendb/io/importer.py - Export
mergendb/io/exporter.py - Import Progress
mergendb/io/progress.py
Server and Studio
- HTTP Server
mergendb/server/server.py - Authentication
mergendb/server/auth.py - Studio Dashboard
packages/mergendb-studio/mergendb_studio/studio_ui.py
Other components
- Application
Connections 38
- Application → Python API: uses
- Application → Node.js SDK: uses
- Application → CLI and REPL: runs
- Python API → Table Operations: opens tables
mergendb/__init__.py - Table Operations → File Writer: writes rows
mergendb/client.py - Table Operations → File Reader: reads tables
mergendb/client.py - Table Operations → SQL Parser: parses SQL
mergendb/client.py - Table Operations → Query Executor: executes queries
mergendb/client.py - Table Operations → Vector Math: searches vectors
mergendb/client.py - Table Operations → Import: imports data
mergendb/client.py - SQL Parser → SQL Lexer: tokenizes
mergendb/query/parser.py - SQL Parser → Query AST: builds AST
mergendb/query/parser.py - Query Planner → Query AST: plans AST
mergendb/query/planner.py - Query Executor → File Reader: scans blocks
mergendb/query/engine.py - Query Executor → Query Planner: uses plan
mergendb/query/engine.py - Query Executor → Query AST: evaluates
mergendb/query/engine.py - Query Executor → Vector Math: computes vectors
mergendb/query/engine.py - File Writer → Compression: encodes columns
mergendb/storage/writer.py - File Writer → Block Metadata: records blocks
mergendb/storage/writer.py - File Writer → Schema and Types: uses schema
mergendb/storage/writer.py - File Reader → Compression: decodes columns
mergendb/storage/reader.py - File Reader → Block Metadata: loads metadata
mergendb/storage/reader.py - File Reader → Schema and Types: uses schema
mergendb/storage/reader.py - Compression → Column Encodings: selects encoding
mergendb/compression/compressor.py - Import → File Writer: streams rows
mergendb/io/importer.py - Import → Schema and Types: defines columns
mergendb/io/importer.py - Import → Import Progress: reports progress
mergendb/io/importer.py - Export → File Reader: reads table
mergendb/io/exporter.py - CLI and REPL → Python API: invokes API
mergendb/cli/repl.py - CLI and REPL → Import: imports files
mergendb/cli/repl.py - CLI and REPL → Export: exports tables
- CLI and REPL → HTTP Server: starts server
mergendb/cli/repl.py - HTTP Server → Python API: serves database
mergendb/server/server.py - HTTP Server → Authentication: authenticates
mergendb/server/server.py - HTTP Server → Import: routes imports
mergendb/server/server.py - HTTP Server → Export: routes exports
mergendb/server/server.py - HTTP Server → Studio Dashboard: serves dashboard
mergendb/server/server.py - Node.js SDK → HTTP Server: connects remotely