log order != exec order

main
Bel LaPointe 2025-06-04 09:04:36 -06:00
parent b088241a51
commit 701b619d04
1 changed files with 2 additions and 2 deletions

View File

@ -155,7 +155,7 @@ func CloneForColumn[T any](db *sql.DB, table, column string, from, to T, omit ..
}
q := fmt.Sprintf(
`INSERT INTO %q (%q, %s) SELECT $2, %s %s %s FROM %q WHERE %q = $1`,
`INSERT INTO %q (%q, %s) SELECT $1, %s %s %s FROM %q WHERE %q = $2`,
table, column, strings.Join(append(incrGenColumns, append(uuidGenColumns, notTheseColumns...)...), ", "),
func() string {
incrs := make([]string, len(incrGenColumns))
@ -180,7 +180,7 @@ func CloneForColumn[T any](db *sql.DB, table, column string, from, to T, omit ..
return s
}(), strings.Join(notTheseColumns, ", "), table, column,
)
log.Printf("EXEC | %s (%v, %v)", q, from, to)
log.Printf("EXEC | %s (%v, %v)", q, to, from)
return Insert(db, q, to, from)
}