diff options
| author | Kyren223 <Kyren223@proton.me> | 2024-11-27 21:29:09 +0200 |
|---|---|---|
| committer | Kyren223 <Kyren223@proton.me> | 2024-11-27 21:29:09 +0200 |
| commit | 82533fa7a583490ea9cebab48c4fc0cdeb3a02f8 (patch) | |
| tree | b8ef0197652e7385233230dbea5afaa4c8f82445 /internal/data | |
| parent | 180bb557b1f82ce81fb042442b9bce75bbefb301 (diff) | |
Fixed sqlc codegen issues
Diffstat (limited to 'internal/data')
| -rw-r--r-- | internal/data/frequencies.sql.go | 10 | ||||
| -rw-r--r-- | internal/data/networks.sql.go | 14 |
2 files changed, 12 insertions, 12 deletions
diff --git a/internal/data/frequencies.sql.go b/internal/data/frequencies.sql.go index 3782309..7460e01 100644 --- a/internal/data/frequencies.sql.go +++ b/internal/data/frequencies.sql.go @@ -17,8 +17,8 @@ INSERT INTO frequencies ( name, hex_color, perms, position ) VALUES ( - ?, ?, ?, ?, ?, - (SELECT COUNT(*) FROM frequencies WHERE network_id = ?) + ?1, ?2, ?3, ?4, ?5, + (SELECT COUNT(*) FROM frequencies WHERE network_id = ?2) ) RETURNING id, network_id, name, hex_color, perms, position ` @@ -195,10 +195,10 @@ func (q *Queries) SetFrequencyPerms(ctx context.Context, arg SetFrequencyPermsPa const swapFrequencies = `-- name: SwapFrequencies :exec UPDATE frequencies SET position = CASE - WHEN position = ? THEN ? - WHEN position = ? THEN ? + WHEN position = ?1 THEN ?2 + WHEN position = ?2 THEN ?1 END -WHERE network_id = ? AND position IN (?, ?) +WHERE network_id = ?3 AND position IN (?1, ?2) ` type SwapFrequenciesParams struct { diff --git a/internal/data/networks.sql.go b/internal/data/networks.sql.go index 5e1e0db..70ee823 100644 --- a/internal/data/networks.sql.go +++ b/internal/data/networks.sql.go @@ -16,7 +16,7 @@ INSERT INTO networks ( id, owner_id, name, is_public, icon, bg_hex_color, fg_hex_color ) VALUES ( - ?, ?, ?, ?, + ?, ?, ?, ?, ?, ?, ? ) RETURNING id, owner_id, name, icon, bg_hex_color, fg_hex_color, is_public @@ -312,15 +312,15 @@ INSERT INTO users_networks ( is_member, is_admin, is_muted, is_banned, ban_reason ) VALUES ( - ?, ?, - ?, ?, ?, - ?, ? + ?1, ?2, + ?3, ?4, ?5, + ?6, ?7 ) ON CONFLICT DO UPDATE SET - is_member = ?, is_admin = ?, is_muted = ?, - is_banned = ?, ban_reason = ? -WHERE user_id = ? AND network_id = ? + is_member = ?3, is_admin = ?4, is_muted = ?5, + is_banned = ?6, ban_reason = ?7 +WHERE user_id = ?1 AND network_id = ?2 RETURNING user_id, network_id, joined_at, is_member, is_admin, is_muted, is_banned, ban_reason ` |
