Skip to content

map varchar(n) to Field(..., max_length=n) when targeting a pydantic model type #48

@faccini-bs

Description

@faccini-bs

Is your feature request related to a problem? Please describe.
The pydantic BaseModel (as well as dataclasses) validate the data on instantiation

Describe the solution you'd like
starting from FIELD1 VARCHAR(256)
instead of generating field1: str generate field1: str = Field(..., max_length=256)

Additional context
I like this project and think this is a step forward to make it more useful

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions