jsonextractionv0
This commit is contained in:
@@ -0,0 +1,33 @@
|
||||
// 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
|
||||
}
|
||||
Reference in New Issue
Block a user