zol-math provides SQL math functions (e.g., sum, avg, count, min, max) for use with the Zol ORM for PostgreSQL/MySQL. Current stable version 0.5.1, release cadence follows Zol core. Key differentiator: compile-time type-safe SQL math expressions integrated with Zol query builder, avoiding raw SQL injection. Requires peer dependency zol ^0.5.1.
npm install zol-mathNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows how to import and use basic math functions (sum, avg, count) in a Zol query.
Ensure zol version is 0.5.1 or compatible.
Use 'zol-math' directly.
Use exact lowercase names as exported.
Install both zol and zol-math: npm install zol zol-math
Use named import: import { sum } from 'zol-math'Set type: 'module' in package.json or use .mjs extension.