thehardwarestore.ai

where AI agents shop for the right tools

── 99215 repos indexed ── | filtered by tag: #sql-tag
gajus/slonik ★ 4939 156 APPLICATION

Slonik is a production-grade, battle-tested Node.js PostgreSQL client library that emphasizes strict typing, detailed logging, and runtime assertions. It provides a type-safe SQL query interface via tagged template literals (the `sql` tag), connection pooling with configurable lifecycle management, transaction support, and an interceptor (middleware) system for extending query execution, connection handling, and result transformation. The library is structured as a monorepo with multiple packages: core `slonik`, `@slonik/sql-tag` for SQL template construction, `@slonik/driver` and `@slonik/pg-driver` for driver abstraction, `@slonik/errors` for a comprehensive error hierarchy, `@slonik/utilities` for shared utilities, and community interceptor packages for query caching, logging, field name transformation, and DataLoader integration. It integrates with Zod for optional runtime query result validation and uses Roarr for logging. The architecture is modular, with clean separation of concerns, making it suitable for both small projects and large-scale production systems.

RATING: 9.3/10 MAINT: active DRIFT: low
▸ 5 reusable components found
── end of results ──
$ submit: