We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
_get_dialects
Describe the bug Symptoms:
Field.describe
db_field_types
CharField
SQL_TYPE
oracle
It is only a small bug I think, but I wanted to share my findings.
To Reproduce
import json from tortoise import Model from tortoise.fields import CharField class SomeModel(Model): some_field = CharField(max_length=255) if __name__ == "__main__": print(json.dumps(SomeModel.describe(serializable=True)["data_fields"][0]["db_field_types"], indent=2)) print(SomeModel._meta.fields_map.get('some_field')._get_dialects()) print(SomeModel._meta.fields_map.get('some_field').get_for_dialect("oracle", "SQL_TYPE"))
outputs:
{ "": "VARCHAR(255)" } {'oracle': {'field': <tortoise.fields.data.CharField object at 0x000001FB0578D370>}} VARCHAR(255)
Expected behavior
{ "": "VARCHAR(255)", "oracle": "NVARCHAR2(255)" } {'oracle': {'SQL_TYPE': 'NVARCHAR2(255)', 'field': <tortoise.fields.data.CharField object at 0x000001FB0578D370>}} NVARCHAR2(255)
Additional context Found this during fiddling around with #1853 ...
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Describe the bug
Symptoms:
Field.describe
does not contain the correctdb_field_types
.CharField
returns the wrongSQL_TYPE
fororacle
It is only a small bug I think, but I wanted to share my findings.
To Reproduce
outputs:
Expected behavior
Additional context
Found this during fiddling around with #1853 ...
The text was updated successfully, but these errors were encountered: