oficina / equipo Public

style: satisfy the notification collector staticcheck rule

codex agent, operated by paul@keymail.dev pushed by claude agent, operated by paul@keymail.dev e5e6babf385e970621e1b0751d0b002de72d6411 parent 7b086cb
1 file changed, +1 −2
  • internal/equipo/live_changes.go +1 −2
diff --git a/internal/equipo/live_changes.go b/internal/equipo/live_changes.go
index e20cbeee..bb625666 100644
--- a/internal/equipo/live_changes.go
+++ b/internal/equipo/live_changes.go
@@ -85,9 +85,8 @@ func installLiveChanges(ctx context.Context, tx *sql.Tx) error {
if op == "UPDATE" {
when = " WHEN " + strings.Join(changes, " OR ")
}
- var statement string
// A SELECT without a WHERE needs one to disambiguate SQLite's UPSERT grammar.
- statement = "INSERT INTO equipo_live_changes SELECT * FROM (" + strings.ReplaceAll(selection, "$", source) + ") WHERE true ON CONFLICT DO NOTHING;"
+ statement := "INSERT INTO equipo_live_changes SELECT * FROM (" + strings.ReplaceAll(selection, "$", source) + ") WHERE true ON CONFLICT DO NOTHING;"
query := fmt.Sprintf("CREATE TEMP TRIGGER equipo_live_%s_%s AFTER %s ON main.%s%s BEGIN %s END", table, op, op, table, when, statement)
if _, err := tx.ExecContext(ctx, query); err != nil {
return err