diff options
Diffstat (limited to 'internal/data/frequencies.sql.go')
| -rw-r--r-- | internal/data/frequencies.sql.go | 78 |
1 files changed, 0 insertions, 78 deletions
diff --git a/internal/data/frequencies.sql.go b/internal/data/frequencies.sql.go index 024c069..9ee8994 100644 --- a/internal/data/frequencies.sql.go +++ b/internal/data/frequencies.sql.go @@ -115,84 +115,6 @@ func (q *Queries) GetNetworkFrequencies(ctx context.Context, networkID snowflake return items, nil } -const setFrequencyColor = `-- name: SetFrequencyColor :one -UPDATE frequencies SET - hex_color = ? -WHERE id = ? -RETURNING id, network_id, name, hex_color, perms, position -` - -type SetFrequencyColorParams struct { - HexColor string - ID snowflake.ID -} - -func (q *Queries) SetFrequencyColor(ctx context.Context, arg SetFrequencyColorParams) (Frequency, error) { - row := q.db.QueryRowContext(ctx, setFrequencyColor, arg.HexColor, arg.ID) - var i Frequency - err := row.Scan( - &i.ID, - &i.NetworkID, - &i.Name, - &i.HexColor, - &i.Perms, - &i.Position, - ) - return i, err -} - -const setFrequencyName = `-- name: SetFrequencyName :one -UPDATE frequencies SET - name = ? -WHERE id = ? -RETURNING id, network_id, name, hex_color, perms, position -` - -type SetFrequencyNameParams struct { - Name string - ID snowflake.ID -} - -func (q *Queries) SetFrequencyName(ctx context.Context, arg SetFrequencyNameParams) (Frequency, error) { - row := q.db.QueryRowContext(ctx, setFrequencyName, arg.Name, arg.ID) - var i Frequency - err := row.Scan( - &i.ID, - &i.NetworkID, - &i.Name, - &i.HexColor, - &i.Perms, - &i.Position, - ) - return i, err -} - -const setFrequencyPerms = `-- name: SetFrequencyPerms :one -UPDATE frequencies SET - perms = ? -WHERE id = ? -RETURNING id, network_id, name, hex_color, perms, position -` - -type SetFrequencyPermsParams struct { - Perms int64 - ID snowflake.ID -} - -func (q *Queries) SetFrequencyPerms(ctx context.Context, arg SetFrequencyPermsParams) (Frequency, error) { - row := q.db.QueryRowContext(ctx, setFrequencyPerms, arg.Perms, arg.ID) - var i Frequency - err := row.Scan( - &i.ID, - &i.NetworkID, - &i.Name, - &i.HexColor, - &i.Perms, - &i.Position, - ) - return i, err -} - const swapFrequencies = `-- name: SwapFrequencies :exec UPDATE frequencies SET position = CASE |
