Skip to content

maybeExpandNamedQuery & driver.Valuer conflict #423

@maxatome

Description

@maxatome

Hi,

In maybeExpandNamedQuery the driver.Valuer interface is tested too late IMHO. It should be the first thing to test in this function.

If I have a map[string]x parameter that implements driver.Valuer interface, it is caught by https://github.com/go-gorp/gorp/blob/master/gorp.go#L216 test...

My use case is to have a set map[string]struct{} with a Value method that changes it to a SQL array of strings.

I can submit a PR, if you agree.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions