nidus-sync/db/query/public/job.go
Eli Ribble 935800e334
Switch to using the Gleipnir fork of jet
Because we need those sweet, sweet geometry columns
2026-05-09 01:48:56 +00:00

17 lines
525 B
Go

package public
import (
"context"
"github.com/Gleipnir-Technology/nidus-sync/db"
"github.com/Gleipnir-Technology/nidus-sync/db/gen/nidus-sync/public/model"
"github.com/Gleipnir-Technology/nidus-sync/db/gen/nidus-sync/public/table"
//"github.com/Gleipnir-Technology/jet/postgres"
)
func JobInsert(ctx context.Context, txn db.Ex, m model.Job) (model.Job, error) {
statement := table.Job.INSERT(table.Job.MutableColumns).
MODEL(m).
RETURNING(table.Job.AllColumns)
return db.ExecuteOne[model.Job](ctx, statement)
}