jsonextractionv0

This commit is contained in:
Michael McGuinness
2024-12-23 12:26:05 +00:00
parent 5f8c9c7b1d
commit 339ce185ad
132 changed files with 6448 additions and 651 deletions
+33
View File
@@ -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
}