A command returning an error aborts the transaction. This is a shortcut to execute a command in a subtransaction so that we can verify an error, but continue to use the original transaction.
(ctx context.Context, exec riverdriver.Executor, sql string)
| 1017 | // execute a command in a subtransaction so that we can verify an error, but |
| 1018 | // continue to use the original transaction. |
| 1019 | func dbExecError(ctx context.Context, exec riverdriver.Executor, sql string) error { |
| 1020 | return dbutil.WithTx(ctx, exec, func(ctx context.Context, exec riverdriver.ExecutorTx) error { |
| 1021 | return exec.Exec(ctx, sql) |
| 1022 | }) |
| 1023 | } |
| 1024 | |
| 1025 | func driverMigrationToInt(r *riverdriver.Migration) int { return r.Version } |
| 1026 | func migrationToInt(migration Migration) int { return migration.Version } |
no test coverage detected
searching dependent graphs…