• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

axkit / velum / 34879528550
88%

Build:
DEFAULT BRANCH: main
Ran 14 Sep 2026 06:14PM UTC
Jobs 1
Files 16
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

14 Sep 2026 06:13PM UTC coverage: 87.767% (-1.5%) from 89.278%
34879528550

push

regorov
add transaction isolation levels

Begin and InTx always used the server default isolation level, so REPEATABLE
READ was unreachable without bypassing velum.

Add velum.IsoLevel, TxOptions{IsoLevel, ReadOnly} and the optional
TxDatabaseWrapper interface with BeginTx, InTxWith and IsRetryable, plus
package-level BeginTx/InTxWith/IsRetryable helpers taking any DatabaseWrapper
and returning ErrTxOptionsUnsupported when it cannot apply options.
DatabaseWrapper itself is unchanged, so external implementations keep
compiling.

pgxw and sqlw translate the options into pgx.TxOptions and sql.TxOptions;
Begin and InTx delegate to them with empty options, keeping commit/rollback in
one place. logw forwards the options and logs the level, or fails with
ErrTxOptionsUnsupported instead of silently downgrading to READ COMMITTED.
IsRetryable matches SQLSTATE 40001 and 40P01 through the SQLState() string
interface, which both pgconn.PgError and pq.Error implement, so sqlw stays
independent of any database/sql driver.

BREAKING: sqlw.Begin now returns velum.Transaction instead of the concrete
TransactionWrapper, so *sqlw.DatabaseWrapper finally satisfies
velum.DatabaseWrapper.

Tests cover the level actually applied (SHOW transaction_isolation), read-only
rejection (25006), a real 40001 conflict between two REPEATABLE READ
transactions, and logw forwarding. Docs: isolation sections in README and
AGENTS.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RbWkiykV7LXmzE9sqdypVP

68 of 112 new or added lines in 4 files covered. (60.71%)

1643 of 1872 relevant lines covered (87.77%)

0.98 hits per line

Uncovered Changes

Lines Coverage ∆ File
25
0.0
0.0% pgxw/pgxw.go
11
28.75
7.44% sqlw/sqlw.go
8
78.38
tx.go
Jobs
ID Job ID Ran Files Coverage
1 34879528550.1 14 Sep 2026 06:14PM UTC 16
87.77
Source Files on build 34879528550
  • Tree
  • List 16
  • Changed 3
  • Source Changed 0
  • Coverage Changed 3
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • 1ff50491 on github
  • Prev Build on main (#34872142433)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc