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

Improvements to scalar adapters typing. #32

Closed
minox86 opened this issue Jan 13, 2022 · 2 comments
Closed

Improvements to scalar adapters typing. #32

minox86 opened this issue Jan 13, 2022 · 2 comments
Assignees
Labels
💫 improvements Improvements or addition to existing functionalities

Comments

@minox86
Copy link
Collaborator

minox86 commented Jan 13, 2022

  1. Every scalar adapter should be optional, even for custom scalars. The default should be an identityAdapter.
  2. When a user define a scalar adapter he should have the ability set only a part of the adapter and other methods fallback to identityAdapter.
  3. Exactly as datasources, scalar adapters should have mongo/sql params only if the the DAOContext has mongo/sql data sources. When there's no entity with a driver the DAOContext should not receive configurations for that driver.
  4. If the ID scalar is configured to be generated by the user, its scalar adapter should be required and the generate method should be also required.
@minox86 minox86 added the 💫 improvements Improvements or addition to existing functionalities label Jan 13, 2022
@minox86 minox86 added this to the Beta 2 milestone Jan 13, 2022
@edobrb
Copy link
Collaborator

edobrb commented Jan 14, 2022

Number 4 is not possible since the generator can be specified directly in the overrides of a specific DAO.
A runtime error should be enough for number 4.

@minox86
Copy link
Collaborator Author

minox86 commented Jan 14, 2022

Well, we can go on without the 4.

@edobrb edobrb closed this as completed Jan 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
💫 improvements Improvements or addition to existing functionalities
Projects
None yet
Development

No branches or pull requests

2 participants