Merged in feature/client (pull request #31)
Client Entity * repolevel * servicefunctions * openapiclientget * openapiupdate * client * vendor
This commit is contained in:
@@ -79,18 +79,6 @@ func (q *Queries) CreateQuery(ctx context.Context, type_ Querytype) (pgtype.UUID
|
||||
return id, err
|
||||
}
|
||||
|
||||
const deprecateQuery = `-- name: DeprecateQuery :exec
|
||||
INSERT INTO queryDeprecations (queryId) VALUES ($1)
|
||||
`
|
||||
|
||||
// DeprecateQuery
|
||||
//
|
||||
// INSERT INTO queryDeprecations (queryId) VALUES ($1)
|
||||
func (q *Queries) DeprecateQuery(ctx context.Context, queryid pgtype.UUID) error {
|
||||
_, err := q.db.Exec(ctx, deprecateQuery, queryid)
|
||||
return err
|
||||
}
|
||||
|
||||
const getQuery = `-- name: GetQuery :one
|
||||
SELECT id, type, activeversion, latestversion, config, requiredids FROM fullActiveQueries WHERE id = $1
|
||||
`
|
||||
@@ -136,24 +124,6 @@ func (q *Queries) GetQueryConfig(ctx context.Context, arg *GetQueryConfigParams)
|
||||
return &i, err
|
||||
}
|
||||
|
||||
const isQueryDeprecated = `-- name: IsQueryDeprecated :one
|
||||
SELECT EXISTS (
|
||||
SELECT 1 FROM queryDeprecations where queryId = $1 and removedAt is null LIMIT 1
|
||||
)
|
||||
`
|
||||
|
||||
// IsQueryDeprecated
|
||||
//
|
||||
// SELECT EXISTS (
|
||||
// SELECT 1 FROM queryDeprecations where queryId = $1 and removedAt is null LIMIT 1
|
||||
// )
|
||||
func (q *Queries) IsQueryDeprecated(ctx context.Context, queryid pgtype.UUID) (bool, error) {
|
||||
row := q.db.QueryRow(ctx, isQueryDeprecated, queryid)
|
||||
var exists bool
|
||||
err := row.Scan(&exists)
|
||||
return exists, err
|
||||
}
|
||||
|
||||
const listQueries = `-- name: ListQueries :many
|
||||
SELECT id, type, activeversion, latestversion, config, requiredids FROM fullActiveQueries
|
||||
`
|
||||
|
||||
Reference in New Issue
Block a user