Kinetic SQL is a lightweight, type-safe Node.js client for PostgreSQL, MySQL, and SQLite, offering real-time subscriptions to database changes (INSERT, UPDATE, DELETE) without WebSockets. Version 3.0.4 is current and stable, with monthly releases. It features automatic TypeScript type generation from your database schema, built-in connection pooling, and a middleware API. Key differentiators include zero-config real-time events, a native NestJS module (KineticModule), and an RPC wrapper for stored procedures. Unlike traditional ORMs, it focuses on real-time reactivity and simplicity.
npm install kinetic-sqlNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows how to initialize KineticClient with PostgreSQL, run a query, and subscribe to real-time table changes.
Replace 'createClient(options)' with 'await KineticClient.create(options)'.
Change 'type: 'postgres'' to 'type: 'pg'' in configuration.
Ensure 'realtimeEnabled: true' is set and optional MySQL dependency is installed.
Run 'npx k-sql gen' only when database schema is stable; commit the generated types to version control.
Switch to ESM (type: 'module' in package.json) or use dynamic import: const { KineticClient } = await import('kinetic-sql');Ensure 'const client = await KineticClient.create(...)' and use the named import { KineticClient }.Set 'realtimeEnabled: true' in config for Postgres; for MySQL install the extra package and enable the flag.