Skip to content
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

Improve Mapping Logic #3

Open
mnavarrocarter opened this issue Oct 30, 2022 · 0 comments
Open

Improve Mapping Logic #3

mnavarrocarter opened this issue Oct 30, 2022 · 0 comments

Comments

@mnavarrocarter
Copy link
Owner

I think mapping is a bit flaky and feels super hacky, and a lot of things are being pulled into the context to make it work. Maybe, when it gets that complicated is time to strip all that and simplify it with some help from userland.

I could add sqlType to the field metadata and have a predefined set of constants with all the known datatypes in all the drivers I support. And then a big ass mapper that will know how to map that based on the information passed by the user via the metadata.

It requires the user input, but then I'm sure I'll be able to handle that case properly. The only drawback is that the more platform/driver aware we do things, the more work is potentially needed if someone decides to migrate from, say MySQL to Postgres.

Anyway, overall I think I need to give mapping a second thought.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant