Drizzle ORM 0.45

Last reviewed Sep 24, 2026

Export as PDF

Prompt Details

Prompt Composition

4prompts
  1. JavaScript ES2026102 lines · 3.1K tokens
  2. Node.js 24101 lines · 5.3K tokens
  3. TypeScript 746 lines · 1.5K tokens
  4. Drizzle ORM 0.4573 lines · 3.3K tokens
Total322 lines · 13.2K tokens

CWE Coverage

  • 20
  • 22
  • 59
  • 73
  • 78
  • 79
  • 88
  • 89
  • 95
  • 113
  • 117
  • 200
  • 208
  • 209
  • 214
  • 250
  • 295
  • 297
  • 319
  • 323
  • 330
  • 338
  • 346
  • 347
  • 352
  • 354
  • 362
  • 367
  • 377
  • 426
  • 444
  • 459
  • 471
  • 488
  • 494
  • 502
  • 524
  • 532
  • 602
  • 639
  • 653
  • 732
  • 754
  • 770
  • 807
  • 829
  • 838
  • 862
  • 863
  • 908
  • 915
  • 916
  • 918
  • 922
  • 942
  • 943
  • 1004
  • 1321
  • 1333

Prompt Preview

Apply the Node.js 24, TypeScript 7, and JavaScript ES2026 prompts first. These rules target Drizzle ORM 0.45.x, checked against 0.45.2, and the compatible Drizzle Kit 0.31.x tooling. Apply dialect and driver rules only to the adapters actually deployed.

Version and driver scope

  • Run the newest drizzle-orm 0.x release and take each one as it ships. Drizzle doesn't backport fixes to older 0.x minors, and npm's caret range on a 0.x version never admits the next minor, so look for a newer minor when you update instead of trusting the range. A release with correct identifier escaping doesn't replace the identifier and alias allowlists under "Queries and parameters".
  • Select the correct drizzle-orm/<driver> entry point and verify the installed driver's runtime, TLS, transaction, and pooling support. Use Node.js 24 and TypeScript 7 as the project baseline; Drizzle's optional driver peer dependencies do not establish compatibility for every driver or compiler combination.
  • Keep ORM, Kit, database drivers, and validation integrations separately pinned and tested. Use 0.45's relations() definitions and the schema initialization option for relational queries; check examples against the installed 0.x APIs before adopting live documentation that now covers 1.0.

Queries and parameters

  • Pass data through operators such as eq() and interpolated values in tagged sql templates. Keep SQL text fixed; an ordinary interpolated JavaScript string passed to db.execute() is raw SQL.
  • Restrict sql.raw() to trusted SQL fragments. Wrapping a raw fragment in sql,