-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
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
Complete Type Mapping #64
base: main
Are you sure you want to change the base?
Conversation
- Add complete list of types.
- Generate types and imports correctly.
@rayliverified thanks for opening the PR! Can you check issues in flake8 pipeline? |
Looks like it's throwing because it doesn't like the formatting. |
@rayliverified repo has pre-commit hooks and inside them exist black formatter - https://github.com/xnuinside/omymodels/blob/main/.pre-commit-config.yaml#L3 |
Reformatted |
- Resolve invalid Pydantic variable names by applying a Field alias.
- Use Field alias only when needed.
- Handle Json types correctly.
- Set default value "True/False" instead of "1/0".
- Add `Field(exclude=True)` annotation for generated columns.
- Fix import abstract type mapping through the pydantic types class.
@rayliverified I merged your PR and now here is conflicts, also several previous tests are failed in test run |
We probably need to work together to get the tests working. I'll work on them once I'm unblocked on the enums. Meanwhile, I'm writing up some documentation on the changes I made and I'll share that with you so you can review. |
@rayliverified enums released in version 1.7.0 simple-ddl-parser |
@rayliverified need to resolve merge request conflicts (they appear after merging your first PR) |
I think the feature set is complete now with the recent changes I pushed
today. Added support for time and date types which need special handling.
Next will be the work on going through the tests.
…On Tue, 1 Oct 2024, 12:28 am Iuliia Volkova, ***@***.***> wrote:
@rayliverified <https://github.com/rayliverified> need to resolve merge
request conflicts (they appear after merging your first PR)
—
Reply to this email directly, view it on GitHub
<#64 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AEXZO3QIC6IMG7DZPQEHYKTZZIXJNAVCNFSM6AAAAABOOO7I22VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGOBUHAZDQNZTGY>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
I've added the complete types for MySQL and PostgreSQL. Correct pydantic types are now generated.