Forge SQL ORM (v2.1.29) is a Drizzle ORM integration for Atlassian Forge's @forge/sql, providing a custom driver, two-level caching (local memory and global via @forge/kvs), schema migration, optimistic locking, and query analysis. It enables type-safe SQL query building with full TypeScript support within Forge apps. Release cadence is active, with frequent minor updates. Key differentiators include built-in caching strategies, performance monitoring, and seamless integration with Drizzle ORM, whereas alternatives like raw @forge/sql lack these features and type safety.
npm install forge-sql-ormNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Initializes the Drizzle driver with @forge/sql, defines a schema, and runs a select query.
Install both: npm install @forge/sql drizzle-orm
Use import { ... } from 'forge-sql-orm' instead of require.Ensure @forge/kvs is set up and imported before using createGlobalCache.
Migrate to explicit cache setup with createLocalCache/createGlobalCache.
Run: npm install forge-sql-orm @forge/sql drizzle-orm
Use: import { forgeSqlDriver } from 'forge-sql-orm'Ensure @forge/sql is initialized and passed as { sql } to forgeSqlDriver