First Check
Commit to Help
Example Code
fromtypingimportOptionalfromsqlmodelimportField, SQLModelfromsqlalchemy.typingimportNVARCHARclassHero(SQLModel, table=True):
id: str=Field(default=None, primary_key=True, dtype=NVARCHAR(32))
name: strsecret_name: strage: Optional[int] =None
Description
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.
Operating System
Linux, Windows
Operating System Details
No response
SQLModel Version
0.0.6
Python Version
Python 3.9.7
Additional Context
No response
First Check
Commit to Help
Example Code
Description
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.
Operating System
Linux, Windows
Operating System Details
No response
SQLModel Version
0.0.6
Python Version
Python 3.9.7
Additional Context
No response