Skip to content

0.3.0: merge #8 (partition/ttl/index/settings + TS/Zod codegen) with the TS→Rust bridge#11

Merged
brentrager merged 5 commits into
mainfrom
rs-0.3.0-integrate
Jun 29, 2026
Merged

0.3.0: merge #8 (partition/ttl/index/settings + TS/Zod codegen) with the TS→Rust bridge#11
brentrager merged 5 commits into
mainfrom
rs-0.3.0-integrate

Conversation

@brentrager

Copy link
Copy Markdown
Contributor

Resolves the version collision: #8 (production-table DDL: PARTITION BY/TTL/INDEX/SETTINGS, parametrized DateTime64(p, tz), + TS/Zod codegen — SMOODEV-2115) and the TS→Rust bridge (codegen Rust rows + introspect, merged to main as 0.2.0) both wanted 0.2.0. This merges them into 0.3.0 so both ship.

61 unit + 3 real-ClickHouse testcontainers integration tests (DDL round-trip; migrate + drift; introspect → codegen), clippy -D warnings clean.

Supersedes #8 (will close it). The monorepo adoption PR #2020 should pin smooai-clickhouse-kit = "0.3".

🤖 Generated with Claude Code

brentrager and others added 5 commits June 26, 2026 16:35
…parametrised DateTime64

Adds the structural DDL knobs the SmooAI observability + audit ClickHouse tables
need so the Rust kit can express the real production schema — it previously
modeled only name/columns/engine/order_by, which couldn't represent any of the
o11y tables (all use PARTITION BY; traces/logs use TTL/INDEX/SETTINGS; audit uses
DateTime64 with an explicit timezone). Per the kit principle, the gap lands in
the crate, not app code.

- TableSpec + FlexibleConfig gain partition_by / ttl / indexes / settings.
- to_create_table_sql renders INDEX lines (inside the column parens), PARTITION
  BY (between ENGINE and ORDER BY), TTL (DateTime64 ttl column auto-wrapped in
  toDateTime()), and SETTINGS — fully backward-compatible when all are empty/None.
- New IndexSpec / TtlSpec / TtlMove types. Safety posture: partition_by, index
  expression/type, ttl intervals/volume, and settings values are app-controlled
  raw fragments (like engine); only identifiers (table/column/index name, ttl
  column, order_by) are validated, and ttl/order_by columns must be real columns.
- ColumnTypeSpec::DateTime64 { datetime64: DateTime64Spec } with validated
  precision (0..=9) + IANA-charset timezone; bare "DateTime64" still renders (3).
- Version 0.1.0 -> 0.2.0. +12 tests (45 -> 51 unit), fmt/clippy clean.

Consumed by SmooAI/smooai SMOODEV-2115 (observability_logs/observability_traces
in api-prime, audit_log_events in audit-worker).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…o rs-0.3.0-integrate

# Conflicts:
#	ROADMAP.md
#	crates/clickhouse-kit/src/codegen.rs
#	crates/clickhouse-kit/src/lib.rs
@changeset-bot

changeset-bot Bot commented Jun 29, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: a5c615a

The changes in this PR will be included in the next version bump.

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@brentrager brentrager merged commit e2fac48 into main Jun 29, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant