Files
query-orchestration/internal/database/repository/job.sql.go
T
Michael McGuinness 5b7160fe44 Merged in fature/jobs (pull request #34)
Job Collector

* createstructure

* mostupdatevalidation

* repocollectorupdate

* updateoutline

* updatevalidation

* scriptupdate

* cleanupdockerignore

* update

* collectorupdateapi
2025-01-23 14:56:20 +00:00

41 lines
916 B
Go

// Code generated by sqlc. DO NOT EDIT.
// versions:
// sqlc v1.27.0
// source: job.sql
package repository
import (
"context"
"github.com/jackc/pgx/v5/pgtype"
)
const createJob = `-- name: CreateJob :one
INSERT INTO jobs (clientId) VALUES ($1) RETURNING id
`
// CreateJob
//
// INSERT INTO jobs (clientId) VALUES ($1) RETURNING id
func (q *Queries) CreateJob(ctx context.Context, clientid pgtype.UUID) (pgtype.UUID, error) {
row := q.db.QueryRow(ctx, createJob, clientid)
var id pgtype.UUID
err := row.Scan(&id)
return id, err
}
const getJob = `-- name: GetJob :one
SELECT id, clientId, canSync FROM jobs WHERE id = $1 LIMIT 1
`
// GetJob
//
// SELECT id, clientId, canSync FROM jobs WHERE id = $1 LIMIT 1
func (q *Queries) GetJob(ctx context.Context, id pgtype.UUID) (*Job, error) {
row := q.db.QueryRow(ctx, getJob, id)
var i Job
err := row.Scan(&i.ID, &i.Clientid, &i.Cansync)
return &i, err
}