Merged in fature/jobs (pull request #34)
Job Collector * createstructure * mostupdatevalidation * repocollectorupdate * updateoutline * updatevalidation * scriptupdate * cleanupdockerignore * update * collectorupdateapi
This commit is contained in:
@@ -0,0 +1,40 @@
|
||||
// Code generated by sqlc. DO NOT EDIT.
|
||||
// versions:
|
||||
// sqlc v1.27.0
|
||||
// source: document.sql
|
||||
|
||||
package repository
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/jackc/pgx/v5/pgtype"
|
||||
)
|
||||
|
||||
const createDocument = `-- name: CreateDocument :one
|
||||
INSERT INTO documents (jobId) VALUES ($1) RETURNING id
|
||||
`
|
||||
|
||||
// CreateDocument
|
||||
//
|
||||
// INSERT INTO documents (jobId) VALUES ($1) RETURNING id
|
||||
func (q *Queries) CreateDocument(ctx context.Context, jobid pgtype.UUID) (pgtype.UUID, error) {
|
||||
row := q.db.QueryRow(ctx, createDocument, jobid)
|
||||
var id pgtype.UUID
|
||||
err := row.Scan(&id)
|
||||
return id, err
|
||||
}
|
||||
|
||||
const getDocument = `-- name: GetDocument :one
|
||||
SELECT id, jobId FROM documents WHERE id = $1 LIMIT 1
|
||||
`
|
||||
|
||||
// GetDocument
|
||||
//
|
||||
// SELECT id, jobId FROM documents WHERE id = $1 LIMIT 1
|
||||
func (q *Queries) GetDocument(ctx context.Context, id pgtype.UUID) (*Document, error) {
|
||||
row := q.db.QueryRow(ctx, getDocument, id)
|
||||
var i Document
|
||||
err := row.Scan(&i.ID, &i.Jobid)
|
||||
return &i, err
|
||||
}
|
||||
Reference in New Issue
Block a user