What's Changed
Patch release that fixes two related but distinct bugs surfaced by #84 — wrong NUMERIC values in MCP query results and Node bindings.
Bug Fixes
- Core:
Numeric::Displayno longer drops the sign for sub-unit negatives. Values in the open interval(-1, 0)previously rendered without the minus sign —Numeric::new(-5000, 4).to_string()returned"0.5000"instead of"-0.5000". The Display impl now computes the sign explicitly and formats the magnitude viaunsigned_abs(), which also removes a latenti128::MINoverflow panic. This silently flipped the sign of any correlation, 0-1 index, or regression residual that crossed the stringify path — including the MCPquerytool's JSON serialization. (#84, #86) - Node bindings:
NUMERICcolumns no longer decode as garbage / NaN.extract_rowand the columnar fast path were callingrow.get_f64()forSqlType::Numericcolumns, which reinterpreted the unscaled-integer bytes as IEEE-754 doubles. Every NUMERIC cell was wrong, regardless of sign. The bindings now use schema-awarerow.get_numeric(), which honors the column scale and dispatches on wire form.getStringreturns the exact decimal text (preserving scale and sign),getFloat64returns the lossy-but-correct double,getInt32/getInt64return the truncated integer, and the columnargetFloat64Columnreturns correctf64values. Related to #84. - Node bindings:
getBigIntnow preserves precision onNUMERIC(p, 0)columns. PreviouslygetBigIntreturnednullfor any NUMERIC cell. It now preserves the full 128-bit unscaled value for integer-shaped numerics — use it instead ofgetInt64for NUMERIC integer values aboveNumber.MAX_SAFE_INTEGER. OnNUMERIC(p, scale>0)columns it returnsnull(usegetStringfor exact text orgetFloat64for a lossy value). Related to #84.
Full Changelog: v0.3.0...v0.3.1
What's Changed
- chore: skip auto-tagging in release-please; manual gh release create stays the gate by @StefanSteiner in #87
- fix: NUMERIC sign loss in Display + Node bindings decode (#84) by @StefanSteiner in #86
- chore: release main by @StefanSteiner in #88
Full Changelog: v0.3.0...v0.3.1