Skip to content

feat(orm): add standard date and time value codecs #501

Description

@GaspardKirira

Summary

Add explicit standard-library date and time conversions for ORM fields.

Current behavior

The mapper compatibility layer does not directly support std::chrono values.

Applications must convert dates and timestamps to strings or integers manually.

Expected behavior

The ORM should provide documented codecs for common std::chrono representations.

Storage format must be explicit and stable.

Scope

  • Support a timestamp representation.
  • Support date-only values where practical.
  • Define UTC handling.
  • Define precision.
  • Define text or integer storage formats.
  • Support optional temporal values.
  • Add SQLite integration tests.
  • Add MySQL integration tests where available.
  • Document timezone limitations.

Suggested files

  • modules/orm/include/vix/orm/codecs/Chrono.hpp
  • modules/orm/tests/chrono_codec_test.cpp
  • modules/orm/docs/...

Acceptance criteria

  • Timestamp encoding is deterministic.
  • Timestamp decoding preserves documented precision.
  • UTC expectations are documented.
  • Empty optional timestamps map to NULL.
  • SQLite round-trip tests pass.
  • Existing mapper APIs remain compatible.

Non-goals

This issue does not include:

  • timezone database management;
  • locale-specific formatting;
  • automatic schema migrations;
  • calendar arithmetic.

Suggested labels

  • scope:orm
  • type:feature
  • tests
  • help wanted
  • status:accepted

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions