Skip to content

database/sql: add generic Null[T] #60370

Closed
@methane

Description

database/sql doesn't have NullUInt64. So drivers and ORMs may implement their own NullUInt64.
Application developers would be confused which NullUInt64 is returned by dynamic Scan methods.

When NullUInt64 was proposed in past, @a8m, @kardianos, @rsc said "wait for generic".
#47953 (comment)

Now we have generics. So can we have it for now? Should it Null[T] or Nullable[T]?

Here is quick implementation: https://go.dev/play/p/Jtx8hP0H1_Z

Activity

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

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions