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

block / mysql
83%

Build:
DEFAULT BRANCH: master
Repo Added 04 Aug 2026 01:53AM UTC
Token I1zGjvGvgv8vXRcSsaOvUeqtnobi2phNd regen
Build 2 Last
Files 20
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

LAST BUILD ON BRANCH master
branch: SELECT
CHANGE BRANCH
x
Sync Branches
  • No branch selected
  • master
  • unified-query

04 Aug 2026 01:58AM UTC coverage: 82.51%. First build
30870374728

push

github

web-flow
conn: add unified QueryResultContext for arbitrary SQL (#1)

* conn: add unified QueryResultContext for arbitrary SQL

A caller that receives arbitrary SQL (a proxy, a REPL) must classify each
statement before executing it, because database/sql forces the choice
between QueryContext and ExecContext up front — and a misclassification
either discards a resultset (Exec) or loses the OK metadata (Query). The
MySQL protocol itself never needed the decision in advance: a COM_QUERY
response is self-describing (an OK packet or a column-count packet).

QueryResultContext surfaces exactly that: it executes a statement and
returns (rows, nil) for a resultset response or (nil, result) for an OK
response. The body mirrors mysqlConn.query verbatim, except an OK response
is reported the way Exec reports it instead of being hidden inside an
empty, done resultset. Reached through (*sql.Conn).Raw with a structural
interface assertion, so no new database/sql plumbing is needed; args are
normalized with CheckNamedValue exactly as database/sql would.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* conn: deliver QueryResultContext rows as raw wire text

Rows produced by QueryResultContext now return every non-NULL cell as
its MySQL wire text ([]byte aliasing the connection buffer) instead of
parsing numeric and temporal columns into Go types. Proxy-style callers
forward values verbatim, so the parse/format round trip is pure
overhead — and it is lossy: zero dates become Go's zero time (year 1),
fractional-second padding is trimmed, and float formatting can drift
from the server's representation.

Regular Query/Exec paths are unchanged; the flag only exists on rows
that never pass through database/sql conversion.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* conn: reject named params and fix scan types on the unified path

Two divergences from the normal query path, both found in review.

QueryResultContext accepted driver.NamedValue with Name set an... (continued)

56 of 73 new or added lines in 3 files covered. (76.71%)

3439 of 4168 relevant lines covered (82.51%)

2573399.75 hits per line

Relevant lines Covered
Build:
Build:
4168 RELEVANT LINES 3439 COVERED LINES
2573399.75 HITS PER LINE
Source Files on master
  • Tree
  • List 20
  • Changed 0
  • Source Changed 0
  • Coverage Changed 0
Coverage ∆ File Lines Relevant Covered Missed Hits/Line

Recent builds

Builds Branch Commit Type Ran Committer Via Coverage
30870374728 master conn: add unified QueryResultContext for arbitrary SQL (#1) * conn: add unified QueryResultContext for arbitrary SQL A caller that receives arbitrary SQL (a proxy, a REPL) must classify each statement before executing it, because database/sql fo... push 04 Aug 2026 02:00AM UTC web-flow github
82.51
30870040810 unified-query conn: reject named params and fix scan types on the unified path Two divergences from the normal query path, both found in review. QueryResultContext accepted driver.NamedValue with Name set and bound it positionally. QueryContext and ExecContex... Pull #1 04 Aug 2026 01:53AM UTC morgo github
82.61
See All Builds (2)

Badge your Repo: mysql

We detected this repo isn’t badged! Grab the embed code to the right, add it to your repo to show off your code coverage, and when the badge is live hit the refresh button to remove this message.

Could not find badge in README.

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

Refresh
  • Settings
  • Repo on GitHub
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