{"id":41138656,"url":"https://github.com/vixcpp/db","last_synced_at":"2026-04-17T19:01:08.771Z","repository":{"id":334040332,"uuid":"1139793020","full_name":"vixcpp/db","owner":"vixcpp","description":"Vix.cpp DB core (anti-ORM): drivers, pool, transactions, migrations.","archived":false,"fork":false,"pushed_at":"2026-04-05T12:09:48.000Z","size":90,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-04-05T14:12:32.331Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/vixcpp.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-01-22T12:27:26.000Z","updated_at":"2026-04-05T12:08:46.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/vixcpp/db","commit_stats":null,"previous_names":["vixcpp/db"],"tags_count":10,"template":false,"template_full_name":null,"purl":"pkg:github/vixcpp/db","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vixcpp%2Fdb","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vixcpp%2Fdb/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vixcpp%2Fdb/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vixcpp%2Fdb/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vixcpp","download_url":"https://codeload.github.com/vixcpp/db/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vixcpp%2Fdb/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31941845,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-17T17:29:20.459Z","status":"ssl_error","status_checked_at":"2026-04-17T17:28:47.801Z","response_time":62,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-01-22T18:44:34.191Z","updated_at":"2026-04-17T19:01:08.765Z","avatar_url":"https://github.com/vixcpp.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Vix DB\n\n\u003cp align=\"center\"\u003e\n  \u003cstrong\u003eThe explicit database layer for modern C++ systems\u003c/strong\u003e\u003cbr/\u003e\n  Deterministic · Predictable · No magic\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://img.shields.io/badge/C%2B%2B-20-blue\" /\u003e\n  \u003cimg src=\"https://img.shields.io/badge/License-MIT-green\" /\u003e\n  \u003cimg src=\"https://img.shields.io/badge/Status-Active-success\" /\u003e\n\u003c/p\u003e\n\n---\n\n## What is Vix DB?\n\n**Vix DB** is the database foundation of **Vix.cpp**.\n\nIt gives you a **direct, explicit, and predictable way** to work with databases in C++ without hiding anything.\n\n```cpp\nauto db = vix::db::Database::sqlite(\"vix.db\");\n\nauto conn = db.pool().acquire();\nconn-\u003eprepare(\"SELECT 1\")-\u003eexec();\n```\n\nNo setup. No hidden layers. No surprises.\n\n---\n\n## The problem with existing abstractions\n\nMost database tools today:\n\n- hide SQL behind heavy abstractions\n- introduce implicit behavior\n- make performance unpredictable\n- couple your code to a framework\n\nThis creates systems that are:\n\n- harder to debug\n- harder to optimize\n- harder to maintain over time\n\n---\n\n## The Vix approach\n\nVix DB does the opposite.\n\n\u003e You control everything. The system stays transparent.\n\n- SQL is explicit\n- transactions are explicit\n- connections are explicit\n- behavior is deterministic\n\nNo hidden queries. No implicit state. No magic.\n\n---\n\n## Designed for real systems\n\nVix DB is built for environments where things actually matter:\n\n- high-load backend services\n- edge and offline-first systems\n- unreliable networks\n- long-running production systems\n\nThis aligns directly with the philosophy behind **Vix.cpp** and **Softadastra**:\n\n\u003e Systems must keep working, even when conditions are not ideal.\n\n---\n\n## What you get\n\nVix DB focuses on **fundamentals done right**:\n\n- connection pooling (thread-safe)\n- explicit transactions (RAII)\n- prepared statements\n- deterministic query execution\n- migration system (code + files)\n- clean driver abstraction (MySQL, SQLite)\n- zero runtime overhead\n- zero hidden allocations\n\nEverything is:\n\n\u003e **opt-in · explicit · predictable**\n\n---\n\n## Ultra simple API\n\nAll complexity is inside Vix.\nYour code stays minimal.\n\n### SQLite\n\n```cpp\nauto db = vix::db::Database::sqlite(\"vix.db\");\n```\n\n### MySQL\n\n```cpp\nauto db = vix::db::Database::mysql(\n  \"tcp://127.0.0.1:3306\",\n  \"root\",\n  \"\",\n  \"vixdb\"\n);\n```\n\n### Query\n\n```cpp\nauto conn = db.pool().acquire();\n\nauto st = conn-\u003eprepare(\"SELECT id, name FROM users WHERE age \u003e ?\");\nst-\u003ebind(1, std::int64_t(18));\n\nauto rs = st-\u003equery();\nwhile (rs-\u003enext())\n{\n  const auto \u0026row = rs-\u003erow();\n  std::cout \u003c\u003c row.getInt64(0) \u003c\u003c \" \" \u003c\u003c row.getString(1) \u003c\u003c \"\\n\";\n}\n```\n\n---\n\n## Transactions (RAII)\n\n```cpp\nvix::db::Transaction tx(db.pool());\n\ntx.conn().prepare(\"INSERT INTO users (name) VALUES (?)\")\n    -\u003ebind(1, std::string(\"Alice\"))\n    -\u003eexec();\n\ntx.commit();\n```\n\n---\n\n## Migrations\n\nSupports both:\n\n- code-based migrations\n- file-based migrations\n\n```cpp\nvix::db::MigrationsRunner runner(conn);\nrunner.runAll();\n```\n\n---\n\n## ORM is optional\n\nVix DB is **not an ORM**.\n\nIt is the **foundation layer**.\n\nIf you want higher-level abstractions, Vix provides an optional ORM module.\n\nIf you don’t:\n\n\u003e Vix DB is complete on its own.\n\nNo forced abstraction. No lock-in.\n\n---\n\n## Built for modern C++\n\n- C++20\n- RAII everywhere\n- explicit ownership\n- no hidden lifetimes\n- clean error handling\n\nIf you like **clear and intentional C++**, this will feel natural.\n\n---\n\n## Architecture\n\n```text\nDrivers (MySQL / SQLite)\n        ↓\nConnection Pool\n        ↓\nDatabase (Facade)\n        ↓\nYour code / ORM (optional)\n```\n\nClear layers. No coupling. No surprises.\n\n---\n\n## Part of Vix.cpp\n\nVix DB is part of **Vix.cpp**, an offline-first, peer-to-peer, high-performance C++ runtime.\n\nIt integrates with:\n\n- Vix Core\n- Vix CLI\n- ORM (optional)\n- WebSocket / networking\n- future distributed systems (Softadastra)\n\n---\n\n## Getting started\n\nBuild with examples:\n\n```bash\ncmake -S . -B build -DVIX_DB_BUILD_EXAMPLES=ON -DVIX_DB_USE_SQLITE=ON\ncmake --build build\n```\n\nRun:\n\n```bash\n./build/examples/vix_db_example_sqlite_basic\n```\n\n---\n\n## Why Vix DB matters\n\nThis is not just another DB wrapper.\n\nIt is part of a bigger vision:\n\n\u003e Rebuilding reliable systems for real-world conditions.\n\n- explicit control\n- deterministic behavior\n- offline-first ready\n- production-first mindset\n\n---\n\n## ⭐ Support the project\n\nIf you believe:\n\n- C++ deserves modern infrastructure\n- systems should be predictable\n- databases should not hide behavior\n\nthen consider starring the project.\n\n👉 https://github.com/vixcpp/vix\n\n---\n\nMIT License\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvixcpp%2Fdb","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvixcpp%2Fdb","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvixcpp%2Fdb/lists"}