subsystem-summary-of-database

Installation
SKILL.md

Database Subsystem — Technical Summary

Overview

The database subsystem provides the persistence layer for stellar-core, wrapping the SOCI C++ database-access library to manage connections to SQLite or PostgreSQL backends. It handles schema versioning/migration, connection pooling for worker threads, metrics collection, and a dual-database architecture (main + misc) for SQLite to avoid write-lock contention.

Key Files

  • Database.h / Database.cpp — Core Database class; connection management, schema migration, pooling, metrics.
  • DatabaseTypeSpecificOperation.h — Visitor pattern for backend-specific (SQLite vs PostgreSQL) code paths.
  • DatabaseConnectionString.h / .cpp — Utility to redact passwords from connection strings for logging.
  • DatabaseUtils.h / .cpp — Helper for batch-deleting old ledger entries from tables.

Key Classes and Data Structures

Database (inherits NonMovableOrCopyable)

Related skills
Installs
1
GitHub Stars
3.3K
First Seen
14 days ago