19 lines
658 B
Go
19 lines
658 B
Go
|
|
package public
|
||
|
|
|
||
|
|
import (
|
||
|
|
"context"
|
||
|
|
|
||
|
|
"github.com/Gleipnir-Technology/nidus-sync/db"
|
||
|
|
//"github.com/Gleipnir-Technology/nidus-sync/db/gen/nidus-sync/public/enum"
|
||
|
|
//"github.com/Gleipnir-Technology/jet/postgres"
|
||
|
|
"github.com/Gleipnir-Technology/nidus-sync/db/gen/nidus-sync/public/model"
|
||
|
|
"github.com/Gleipnir-Technology/nidus-sync/db/gen/nidus-sync/public/table"
|
||
|
|
)
|
||
|
|
|
||
|
|
func ReportTextInsert(ctx context.Context, txn db.Tx, m model.ReportText) (model.ReportText, error) {
|
||
|
|
statement := table.ReportText.INSERT(table.ReportText.MutableColumns).
|
||
|
|
MODEL(m).
|
||
|
|
RETURNING(table.ReportText.AllColumns)
|
||
|
|
return db.ExecuteOneTx[model.ReportText](ctx, txn, statement)
|
||
|
|
}
|