omymodels
omymodels copied to clipboard
map varchar(n) to Field(..., max_length=n) when targeting a pydantic model type
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