Files
query-orchestration/internal/database/repository/query.sql.go
T

34 lines
761 B
Go
Raw Normal View History

2024-12-23 12:26:05 +00:00
// Code generated by sqlc. DO NOT EDIT.
// versions:
// sqlc v1.27.0
// source: query.sql
package repository
import (
"context"
"github.com/jackc/pgx/v5/pgtype"
)
const getQueryConfig = `-- name: GetQueryConfig :one
SELECT id, config FROM queryConfigs where queryId = $1 and addedVersion >= $2 and COALESCE(removedVersion, $2 - 1) < $2
`
type GetQueryConfigParams struct {
Queryid pgtype.UUID
Addedversion int32
}
type GetQueryConfigRow struct {
ID pgtype.UUID
Config []byte
}
func (q *Queries) GetQueryConfig(ctx context.Context, arg GetQueryConfigParams) (GetQueryConfigRow, error) {
row := q.db.QueryRow(ctx, getQueryConfig, arg.Queryid, arg.Addedversion)
var i GetQueryConfigRow
err := row.Scan(&i.ID, &i.Config)
return i, err
}