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

Add per driver Scanner and Valuer interface #17

Open
2 tasks
AlexisMontagne opened this issue Jan 6, 2021 · 0 comments
Open
2 tasks

Add per driver Scanner and Valuer interface #17

AlexisMontagne opened this issue Jan 6, 2021 · 0 comments
Labels

Comments

@AlexisMontagne
Copy link
Member

AlexisMontagne commented Jan 6, 2021

Description

Certain data type are not interpreted the same way in between different drivers.

The idea would be to:

  • type assert the input values with an interface like interface { XxxValue() (driver.Value, error) }
  • type assert the scanned values with an interface like interface { ScanXxx(interface{}) error }

It would bring two advantages:
1 - Allow a driver agnostic usage of Scanner/Valuer data types
2 - Use driver optimisation for certain data types (i.e. hstore in postgres etc...)

Acceptance Criteria

  • Implement this semantic over backend/postgres
  • Implement this semantic over backend/sqlite3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant