from typing import Optional from sqlmodel import Field, SQLModel from sqlalchemy.typing import NVARCHAR class Hero(SQLModel, table=True): id: str = Field(default=None, primary_key=True, dtype=NVARCHAR(32)) name: str secret_name: str age: Optional[int] = None
Create a SQLModel that contains a mapping between python type (e.g str) and SQL Server column type (e.g NVARCHAR(32)). This is possible to do when using pandas to_sql() by specifying the dtype-argument.
Linux, Windows
No response
0.0.6
Python 3.9.7
I think this is supported now with sa_type.
Activity
JacobHayes commented on May 16, 2024
I think this is supported now with sa_type.