patito.Model.sql_types
- property Model.sql_types: dict[str, str]
Return compatible DuckDB SQL types for all model fields.
- Return type
dict
[str
,str
]- Returns
Dictionary with column name keys and SQL type identifier strings.
Example
>>> from typing import Literal >>> import patito as pt
>>> class MyModel(pt.Model): ... int_column: int ... str_column: str ... float_column: float ... literal_column: Literal["a", "b", "c"] ... >>> MyModel.sql_types {'int_column': 'INTEGER', 'str_column': 'VARCHAR', 'float_column': 'DOUBLE', 'literal_column': 'enum__4a496993dde04060df4e15a340651b45'}