(ctx context.Context, id db.GraphID)
| 108 | } |
| 109 | |
| 110 | func (d *DB) DeleteGraph(ctx context.Context, id db.GraphID) error { |
| 111 | if err := d.q.DeleteGraph(ctx, string(id)); errors.Is(err, sql.ErrNoRows) { |
| 112 | return db.NotExists("graph", id) |
| 113 | } else if err != nil { |
| 114 | return fmt.Errorf("failed to delete graph: %w", err) |
| 115 | } |
| 116 | return nil |
| 117 | } |
| 118 | |
| 119 | func (d *DB) AddGraphSalt(ctx context.Context, gID db.GraphID, salt *db.GraphSalt) error { |
| 120 | id := uuid.NewString() |
nothing calls this directly
no test coverage detected