log order != exec order
parent
b088241a51
commit
701b619d04
4
main.go
4
main.go
|
|
@ -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)
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue