First Check
Commit to Help
Example Code
from datetime import datetime
from typing import Optional
from sqlmodel import Field, SQLModel
class Test(SQLModel, table=True):
text: str
code: bit[1]
date: datetime
Description
First of all I don't know exactly what are all the available types are so I looked at the sqlalchemy import statements over at https://github.com/tiangolo/sqlmodel/blob/7fcd4fd7c5661d2621e89ebf3a87059ac91ea6d2/sqlmodel/__init__.py
However I do not see an equivalent for MySQL's BIT(1) so what can I do here? I am trying to connect to an existing MySQL table and it has a data type as BIT(1) which when I google it seems to be a Boolean? or TINYINT
Just not clear to me how I can make SQLModel work with this table containing BIT(1) as data type.
Operating System
Linux
Operating System Details
No response
SQLModel Version
0.0.6
Python Version
3.8
Additional Context
No response
First Check
Commit to Help
Example Code
Description
First of all I don't know exactly what are all the available types are so I looked at the sqlalchemy import statements over at https://github.com/tiangolo/sqlmodel/blob/7fcd4fd7c5661d2621e89ebf3a87059ac91ea6d2/sqlmodel/__init__.py
However I do not see an equivalent for MySQL's
BIT(1)so what can I do here? I am trying to connect to an existing MySQL table and it has a data type asBIT(1)which when I google it seems to be a Boolean? orTINYINTJust not clear to me how I can make SQLModel work with this table containing
BIT(1)as data type.Operating System
Linux
Operating System Details
No response
SQLModel Version
0.0.6
Python Version
3.8
Additional Context
No response