Skip to content

Commit

Permalink
Update upsert.go docstring (#3055)
Browse files Browse the repository at this point in the history
  • Loading branch information
severinson authored Oct 20, 2023
1 parent f6b9566 commit b89dd69
Showing 1 changed file with 0 additions and 10 deletions.
10 changes: 0 additions & 10 deletions internal/common/database/upsert.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,16 +40,6 @@ func UpsertWithTransaction[T any](ctx *armadacontext.Context, db *pgxpool.Pool,
// The records to write should be structs with fields marked with "db" tags.
// Field names and values are extracted using the NamesValuesFromRecord function;
// see its definition for details. The first field is used as the primary key in SQL.
//
// The temporary table is created with the provided schema, which should be of the form
// (
//
// id UUID PRIMARY KEY,
// width int NOT NULL,
// height int NOT NULL
//
// )
// I.e., it should omit everything before and after the "(" and ")", respectively.
func Upsert[T any](ctx *armadacontext.Context, tx pgx.Tx, tableName string, records []T) error {
if len(records) < 1 {
return nil
Expand Down

0 comments on commit b89dd69

Please sign in to comment.