drizzle-orm

Headless TypeScript ORM with a head. Runs on Node, Bun and Deno. Lives on the Edge and yes, it's a JavaScript ORM too 😅

APACHE-2.0 License

Downloads
4.4M
Stars
19.3K
Committers
93

Bot releases are visible (Hide)

drizzle-orm - 0.25.0

Published by github-actions[bot] over 1 year ago

ESM support

  • 🎉 Added ESM support! You can now use drizzle-orm in both ESM and CJS environments.
  • 🎉 Added code minification and source maps.
  • ❗ Removed several nested import paths. Most notably, everything from drizzle-orm/sql and drizzle-orm/expressions should now be imported from drizzle-orm instead.
drizzle-orm - 0.24.5

Published by github-actions[bot] over 1 year ago

  • Add possibility to have placeholders in .limit() and .offset()
const stmt = db
  .select({
    id: usersTable.id,
    name: usersTable.name,
  })
  .from(usersTable)
  .limit(placeholder('limit'))
  .offset(placeholder('offset'))
  .prepare('stmt');

const result = await stmt.execute({ limit: 1, offset: 1 });
drizzle-orm - 0.24.4

Published by github-actions[bot] over 1 year ago

  • 🐛 Added verbose error when .values() is called without values (#441)
  • 🐛 Fixed nested PG arrays mapping (#460)
  • ❗ Removed spread syntax in .values() (#269)
  • 🐛 Fixed passing undefined as field value to insert/update (#375)
drizzle-orm - 0.24.3

Published by github-actions[bot] over 1 year ago

  • 🐛 Fixed query generation when selecting from alias
drizzle-orm - 0.24.2

Published by github-actions[bot] over 1 year ago

  • 🐛 Pool connections opened for transactions are now closed after the transaction is committed or rolled back
drizzle-orm - 0.24.1

Published by github-actions[bot] over 1 year ago

Bugs

🐛 Fix onConflict targets in #475 - thanks @wkunert ❤️

Documentation

Thanks to @tmcw we have started our way to get JSDoc documentation

📄 JSDoc for conditions in #467 - thanks @tmcw ❤️

drizzle-orm - 0.24.0

Published by github-actions[bot] over 1 year ago

  • 🎉 Added iterator support to mysql2 (sponsored by @rizen ❤). Read more in the docs
  • .prepare() in MySQL no longer requires a name argument
drizzle-orm - 0.23.13

Published by github-actions[bot] over 1 year ago

  • 🎉 All enum and text enum columns now have a properly typed enumValues property
drizzle-orm - 0.23.12

Published by github-actions[bot] over 1 year ago

  • 🐛 Fixed multi-level join results (e.g. joining a subquery with a nested join)
drizzle-orm - 0.23.11

Published by github-actions[bot] over 1 year ago

  • 🐛 Fix migrator function for PostgreSQL

Would suggest to upgrade to this version anyone who is using postgres dialect. 0.23.9 and 0.23.10 are broken for postgresql migrations

drizzle-orm - 0.23.10

Published by github-actions[bot] over 1 year ago

  • 🐛 Added missing config argument to transactions API
  • 🐛 Fixed Postgres and MySQL schema declaration (#427)
drizzle-orm - 0.23.9

Published by github-actions[bot] over 1 year ago

Transactions support 🎉

You can now use transactions with all the supported databases and drivers.

node-postgres example:

await db.transaction(async (tx) => {
  await tx.insert(users).values(newUser);
  await tx.update(users).set({ name: 'Mr. Dan' }).where(eq(users.name, 'Dan'));
  await tx.delete(users).where(eq(users.name, 'Dan'));
});

For more information, see transactions docs:

drizzle-orm - 0.23.8

Published by github-actions[bot] over 1 year ago

  • 🐛 Fixed dates timezone differences for timestamps in Postgres and MySQL (contributed by @AppelBoomHD via #288)
drizzle-orm - 0.23.7

Published by github-actions[bot] over 1 year ago

  • 🎉 Added INSERT IGNORE support for MySQL (contributed by @FugiTech via #305)
drizzle-orm - 0.23.6

Published by github-actions[bot] over 1 year ago

  • 🐛 Fixed referencing the selected aliased field in the same query
  • 🐛 Fixed decimal column data type in MySQL
  • 🐛 Fixed mode autocompletion for integer column in SQLite
  • 🐛 Fixed extra parentheses in the generated SQL for the IN operator (#382)
  • 🐛 Fixed regression in pgEnum.enumValues type (#358)
  • 🎉 Allowed readonly arrays to be passed to pgEnum
drizzle-orm - 0.23.5

Published by github-actions[bot] over 1 year ago

  • 🐛 Various minor bugfixes
drizzle-orm - 0.23.4

Published by github-actions[bot] over 1 year ago

  • 🐛 Fixed broken types in Kysely and Knex adapters
drizzle-orm - 0.23.3

Published by github-actions[bot] over 1 year ago

drizzle-orm - 0.23.2

Published by github-actions[bot] over 1 year ago

  • 🐛 Rolled back some breaking changes for drizzle-kit
drizzle-orm - 0.23.1

Published by github-actions[bot] over 1 year ago

  • 🐛 Re-export InferModel from drizzle-orm