Skip to content

Commit 6057333

Browse files
committed
Add Python SQLModel code generator design document
DOCS: Add comprehensive design for Python SQLModel/Pydantic codegen This document outlines the complete design for implementing a Python code generator that converts PostgreSQL DDL schema definitions to SQLModel and Pydantic models. Key aspects include: - Architecture with modular components (type mapping, naming, models) - Comprehensive PostgreSQL to Python type mapping table - Field generation patterns for all constraint types - Edge case handling (reserved words, circular refs, arrays, JSONB) - Testing strategy with unit and snapshot tests - Implementation plan broken into 8 phases Also adds genco 0.19 as a dependency for Python code generation. https://claude.ai/code/session_01Mr4TzZKNorjrdtJyVnDwuW
1 parent 19ade5a commit 6057333

3 files changed

Lines changed: 673 additions & 0 deletions

File tree

Cargo.lock

Lines changed: 29 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

crates/codegen/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,5 @@ version = "0.1.0"
44
edition = "2024"
55

66
[dependencies]
7+
genco = "0.19.0"
78
tern-ddl = { path = "../ddl" }

0 commit comments

Comments
 (0)