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

[Feature Request] otelsql: allow named parameters #119

Open
monwolf opened this issue Feb 20, 2024 · 0 comments
Open

[Feature Request] otelsql: allow named parameters #119

monwolf opened this issue Feb 20, 2024 · 0 comments

Comments

@monwolf
Copy link

monwolf commented Feb 20, 2024

We are starting to instrument a service with otel and otelsql. It worked fine until we tested queries with named parameters, and we received the following error:

{ 	"error": "otelsql: driver does not support named parameters" }

the code generating the error is:

    namedParams = append(namedParams, sql.Named("numper", userID))
    namedParams = append(namedParams, sql.Named("fechaIni", filtros.FecIni.NullTime))
    namedParams = append(namedParams, sql.Named("fechaFin", filtros.FecFin.NullTime))
    rows, err := repo.db.Query(dbQuery, namedParams...)

We would appreciate having this functionality.

Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant