Skip to content

[EPIC] database_system: introduce include/ directory and standardize layout #577

Description

@kcenon

Summary

Phase 2 of the ecosystem-wide directory structure standardization. database_system currently lacks a public-header directory entirely — every .h file lives in database/ mixed with .cpp files. Introduce include/kcenon/database/, separate public headers from implementation, and split the single 600+-test unit_tests.cpp into per-module test files.

Part of kcenon/common_system#657 (master EPIC).

Why

  • Largest structural deviation in the ecosystem — no other system mixes public headers with implementation
  • Install rules currently require special-case copying from database/ tree; every consumer faces non-standard #include paths
  • Single unit_tests.cpp defeats parallel test compilation and forces full rebuild on any change

Scope

  1. Create include/kcenon/database/ with feature subdirectories (core, backends, query, orm, security, storage, async, monitoring, protocol)
  2. Move all public .h files from database/ into include/kcenon/database/
  3. Rename database/src/; keep only .cpp files plus private headers
  4. Update all #include paths across the repo plus downstream consumers (pacs)
  5. Split tests/unit_tests.cpp into ~10-15 per-module test files
  6. Decompose 596-line CMakeLists.txt into cmake/*.cmake modules per the canonical template
  7. Add forwarding headers in old paths with [[deprecated]] for one release

Child Issues

  • Header path migration (include/ creation + moves)
  • src/ rename + #include sweep
  • unit_tests.cpp split per module
  • CMakeLists.txt decomposition
  • Forwarding headers with deprecation warnings
  • Downstream pacs_system include path update

Acceptance Criteria

  • All public headers under include/kcenon/database/
  • No .h files remain in src/ (private headers explicitly marked or moved)
  • tests/ contains per-module test files; CTest reports tests grouped by module
  • cmake/*.cmake modules match the canonical template
  • Forwarding headers warn on use; removal scheduled for next minor release
  • Downstream pacs builds pass with at most deprecation warnings

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions