chore: fix postgres driver

This commit is contained in:
Steven
2023-12-17 20:07:25 +08:00
parent a7d48e8059
commit 4c66edc170
18 changed files with 104 additions and 200 deletions

View File

@ -2,7 +2,6 @@ package postgres
import (
"context"
"database/sql"
"fmt"
"strings"
@ -207,12 +206,6 @@ func (d *DB) DeleteShortcut(ctx context.Context, delete *store.DeleteShortcut) e
return err
}
func vacuumShortcut(ctx context.Context, tx *sql.Tx) error {
stmt := `DELETE FROM shortcut WHERE creator_id NOT IN (SELECT id FROM "user")`
_, err := tx.ExecContext(ctx, stmt)
return err
}
func filterTags(tags []string) []string {
result := []string{}
for _, tag := range tags {