Skip to content

Add per driver Scanner and Valuer interface #17

Description

@AlexisMontagne

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions