(ctx context.Context, id db.GraphID)
| 32 | } |
| 33 | |
| 34 | func (d *DB) IncrementTx(ctx context.Context, id db.GraphID) (db.Tx, error) { |
| 35 | res, err := d.q.IncrementTx(ctx, string(id)) |
| 36 | if errors.Is(err, sql.ErrNoRows) { |
| 37 | return 0, db.NotExists("graph", id) |
| 38 | } else if err != nil { |
| 39 | return 0, fmt.Errorf("failed to increment tx: %w", err) |
| 40 | } |
| 41 | return db.Tx(res), nil |
| 42 | } |
| 43 | |
| 44 | func (d *DB) SetTx(ctx context.Context, id db.GraphID, tx db.Tx) error { |
| 45 | if err := d.q.SetTx(ctx, sqlitedb.SetTxParams{ |
nothing calls this directly
no test coverage detected