38 lines
655 B
Go
38 lines
655 B
Go
// Code generated by sqlc. DO NOT EDIT.
|
|
// versions:
|
|
// sqlc v1.26.0
|
|
// source: insert.sql
|
|
|
|
package sql
|
|
|
|
import (
|
|
"context"
|
|
)
|
|
|
|
const insert = `-- name: Insert :one
|
|
INSERT INTO unpack_history (input, result)
|
|
VALUES ($1, $2)
|
|
RETURNING
|
|
id,
|
|
input,
|
|
result,
|
|
created_at
|
|
`
|
|
|
|
type InsertParams struct {
|
|
Input string `db:"input" json:"input"`
|
|
Result string `db:"result" json:"result"`
|
|
}
|
|
|
|
func (q *Queries) Insert(ctx context.Context, arg InsertParams) (UnpackHistory, error) {
|
|
row := q.db.QueryRow(ctx, insert, arg.Input, arg.Result)
|
|
var i UnpackHistory
|
|
err := row.Scan(
|
|
&i.ID,
|
|
&i.Input,
|
|
&i.Result,
|
|
&i.CreatedAt,
|
|
)
|
|
return i, err
|
|
}
|