This was an epically long change, and a terrible idea, but it compiles. This was essentially a cascade that came about because I can't blend jet and bob in the same transaction. In for a penny, I guess...
17 lines
541 B
Go
17 lines
541 B
Go
package publicreport
|
|
|
|
import (
|
|
"context"
|
|
//"time"
|
|
|
|
"github.com/Gleipnir-Technology/nidus-sync/db"
|
|
"github.com/Gleipnir-Technology/nidus-sync/db/gen/nidus-sync/publicreport/model"
|
|
"github.com/Gleipnir-Technology/nidus-sync/db/gen/nidus-sync/publicreport/table"
|
|
//"github.com/go-jet/jet/v2/postgres"
|
|
)
|
|
|
|
func NuisanceInsert(ctx context.Context, txn db.Ex, m model.Nuisance) (model.Nuisance, error) {
|
|
statement := table.Nuisance.INSERT(table.Nuisance.AllColumns).
|
|
MODEL(m)
|
|
return db.ExecuteOneTx[model.Nuisance](ctx, txn, statement)
|
|
}
|