jackc / jackc/pgx

Something like pgx.StrictStructArgs`Slic`

Open
#2,575 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
14.3k
Forks
1.1k
Avg merge
6d 9h
Merged PRs (30d)
11

Description

**Is your feature request related to a problem? Please describe.**

In sqlx using `NamedQuery` in an INSERT statement, you can pass in an slic of structs with `db` tags and it would go though each element in the array and append the `VALUES (..)`

**Describe the solution you'd like**
Could this be done in pgx?

**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.

**Additional context**
Add any other context or screenshots about the feature request here.

Contributor guide

Open the contributing guide

Research direction

No file or test is named. Start by reviewing pgx's existing StrictStructArgs and query-building APIs, then compare the requested behavior with sqlx's NamedQuery handling of slices of tagged structs. Done would mean a defined pgx-supported way to expand such a slice into INSERT VALUES arguments.

Written by the indexing model from the issue text.

Assessment

Tech stack
go, postgresql
Domain
database
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.