extract common create and updatelogic
This commit is contained in:
@@ -77,17 +77,6 @@ func (q *Queries) GetQueryConfig(ctx context.Context, arg GetQueryConfigParams)
|
||||
return i, err
|
||||
}
|
||||
|
||||
const getQueryType = `-- name: GetQueryType :one
|
||||
SELECT type FROM queries where id = $1
|
||||
`
|
||||
|
||||
func (q *Queries) GetQueryType(ctx context.Context, id pgtype.UUID) (Querytype, error) {
|
||||
row := q.db.QueryRow(ctx, getQueryType, id)
|
||||
var type_ Querytype
|
||||
err := row.Scan(&type_)
|
||||
return type_, err
|
||||
}
|
||||
|
||||
const isQueryDeprecated = `-- name: IsQueryDeprecated :one
|
||||
SELECT EXISTS (
|
||||
SELECT 1 FROM queryDeprecations where queryId = $1 and removedAt is not null
|
||||
|
||||
Reference in New Issue
Block a user