drizzle-team/drizzle-orm (drizzle-kit)
### [`v0.24.0`](https://togithub.com/drizzle-team/drizzle-orm/releases/tag/0.24.0)
[Compare Source](https://togithub.com/drizzle-team/drizzle-orm/compare/drizzle-kit@0.23.2...drizzle-kit@0.24.0)
- š Added iterator support to `mysql2` (sponsored by [@rizen](https://togithub.com/rizen) ā¤). Read more in the [docs](https://togithub.com/drizzle-team/drizzle-orm/blob/main/drizzle-orm/src/mysql-core/README.md#querying-large-datasets)
- ā `.prepare()` in MySQL no longer requires a name argument
### [`v0.23.2`](https://togithub.com/drizzle-team/drizzle-orm/releases/tag/0.23.2)
[Compare Source](https://togithub.com/drizzle-team/drizzle-orm/compare/0.23.1...drizzle-kit@0.23.2)
- š Rolled back some breaking changes for drizzle-kit
### [`v0.23.1`](https://togithub.com/drizzle-team/drizzle-orm/releases/tag/0.23.1)
[Compare Source](https://togithub.com/drizzle-team/drizzle-orm/compare/0.23.0...0.23.1)
- š Re-export `InferModel` from `drizzle-orm`
### [`v0.23.0`](https://togithub.com/drizzle-team/drizzle-orm/releases/tag/0.23.0)
[Compare Source](https://togithub.com/drizzle-team/drizzle-orm/compare/50f22b0282a6c7a115da4240fd63d9a3fa596526...0.23.0)
- š Added Knex and Kysely adapters! They allow you to manage the schemas and migrations with Drizzle and query the data with your favorite query builder. See documentation for more details:
- [Knex adapter](https://togithub.com/drizzle-team/drizzle-knex)
- [Kysely adapter](https://togithub.com/drizzle-team/drizzle-kysely)
- š Added "type maps" to all entities. You can access them via the special `_` property. For example:
```ts
const users = mysqlTable('users', {
id: int('id').primaryKey(),
name: text('name').notNull(),
});
type UserFields = typeof users['_']['columns'];
type InsertUser = typeof users['_']['model']['insert'];
```
Full documentation on the type maps is coming soon.
- š Added `.$type()` method to all column builders to allow overriding the data type. It also replaces the optional generics on columns.
```ts
// Before
const test = mysqlTable('test', {
jsonField: json('json_field'),
});
// After
const test = mysqlTable('test', {
jsonField: json('json_field').$type(),
});
```
- ā Changed syntax for text-based enum columns:
```ts
// Before
const test = mysqlTable('test', {
role: text<'admin' | 'user'>('role'),
});
// After
const test = mysqlTable('test', {
role: text('role', { enum: ['admin', 'user'] }),
});
```
- š Allowed passing an array of values into `.insert().values()` directly without spreading:
```ts
const users = mysqlTable('users', {
id: int('id').primaryKey(),
name: text('name').notNull(),
});
await users.insert().values([
{ name: 'John' },
{ name: 'Jane' },
]);
```
The spread syntax is now deprecated and will be removed in one of the next releases.
- š Added "table creators" to allow for table name customization:
```ts
import { mysqlTableCreator } from 'drizzle-orm/mysql-core';
const mysqlTable = mysqlTableCreator((name) => `myprefix_${name}`);
const users = mysqlTable('users', {
id: int('id').primaryKey(),
name: text('name').notNull(),
});
// Users table is a normal table, but its name is `myprefix_users` in runtime
```
- š Implemented support for selecting/joining raw SQL expressions:
```ts
// select current_date + s.a as dates from generate_series(0,14,7) as s(a);
const result = await db
.select({
dates: sql`current_date + s.a`,
})
.from(sql`generate_series(0,14,7) as s(a)`);
```
- š Fixed a lot of bugs from user feedback on GitHub and Discord (thank you! ā¤). Fixes [#293](https://togithub.com/drizzle-team/drizzle-orm/issues/293) [#301](https://togithub.com/drizzle-team/drizzle-orm/issues/301) [#276](https://togithub.com/drizzle-team/drizzle-orm/issues/276) [#269](https://togithub.com/drizzle-team/drizzle-orm/issues/269) [#253](https://togithub.com/drizzle-team/drizzle-orm/issues/253) [#311](https://togithub.com/drizzle-team/drizzle-orm/issues/311) [#312](https://togithub.com/drizzle-team/drizzle-orm/issues/312)
Configuration
š Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
š¦ Automerge: Enabled.
ā» Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
š Ignore: Close this PR and you won't be reminded about this update again.
[ ] If you want to rebase/retry this PR, check this box
This PR contains the following updates:
^0.22.8
->^0.24.0
Release Notes
drizzle-team/drizzle-orm (drizzle-kit)
### [`v0.24.0`](https://togithub.com/drizzle-team/drizzle-orm/releases/tag/0.24.0) [Compare Source](https://togithub.com/drizzle-team/drizzle-orm/compare/drizzle-kit@0.23.2...drizzle-kit@0.24.0) - š Added iterator support to `mysql2` (sponsored by [@rizen](https://togithub.com/rizen) ā¤). Read more in the [docs](https://togithub.com/drizzle-team/drizzle-orm/blob/main/drizzle-orm/src/mysql-core/README.md#querying-large-datasets) - ā `.prepare()` in MySQL no longer requires a name argument ### [`v0.23.2`](https://togithub.com/drizzle-team/drizzle-orm/releases/tag/0.23.2) [Compare Source](https://togithub.com/drizzle-team/drizzle-orm/compare/0.23.1...drizzle-kit@0.23.2) - š Rolled back some breaking changes for drizzle-kit ### [`v0.23.1`](https://togithub.com/drizzle-team/drizzle-orm/releases/tag/0.23.1) [Compare Source](https://togithub.com/drizzle-team/drizzle-orm/compare/0.23.0...0.23.1) - š Re-export `InferModel` from `drizzle-orm` ### [`v0.23.0`](https://togithub.com/drizzle-team/drizzle-orm/releases/tag/0.23.0) [Compare Source](https://togithub.com/drizzle-team/drizzle-orm/compare/50f22b0282a6c7a115da4240fd63d9a3fa596526...0.23.0) - š Added Knex and Kysely adapters! They allow you to manage the schemas and migrations with Drizzle and query the data with your favorite query builder. See documentation for more details: - [Knex adapter](https://togithub.com/drizzle-team/drizzle-knex) - [Kysely adapter](https://togithub.com/drizzle-team/drizzle-kysely) - š Added "type maps" to all entities. You can access them via the special `_` property. For example: ```ts const users = mysqlTable('users', { id: int('id').primaryKey(), name: text('name').notNull(), }); type UserFields = typeof users['_']['columns']; type InsertUser = typeof users['_']['model']['insert']; ``` Full documentation on the type maps is coming soon. - š Added `.$type()` method to all column builders to allow overriding the data type. It also replaces the optional generics on columns. ```ts // Before const test = mysqlTable('test', { jsonField: json('json_field'), }); // After const test = mysqlTable('test', { jsonField: json('json_field').$type(), }); ``` - ā Changed syntax for text-based enum columns: ```ts // Before const test = mysqlTable('test', { role: text<'admin' | 'user'>('role'), }); // After const test = mysqlTable('test', { role: text('role', { enum: ['admin', 'user'] }), }); ``` - š Allowed passing an array of values into `.insert().values()` directly without spreading: ```ts const users = mysqlTable('users', { id: int('id').primaryKey(), name: text('name').notNull(), }); await users.insert().values([ { name: 'John' }, { name: 'Jane' }, ]); ``` The spread syntax is now deprecated and will be removed in one of the next releases. - š Added "table creators" to allow for table name customization: ```ts import { mysqlTableCreator } from 'drizzle-orm/mysql-core'; const mysqlTable = mysqlTableCreator((name) => `myprefix_${name}`); const users = mysqlTable('users', { id: int('id').primaryKey(), name: text('name').notNull(), }); // Users table is a normal table, but its name is `myprefix_users` in runtime ``` - š Implemented support for selecting/joining raw SQL expressions: ```ts // select current_date + s.a as dates from generate_series(0,14,7) as s(a); const result = await db .select({ dates: sql`current_date + s.a`, }) .from(sql`generate_series(0,14,7) as s(a)`); ``` - š Fixed a lot of bugs from user feedback on GitHub and Discord (thank you! ā¤). Fixes [#293](https://togithub.com/drizzle-team/drizzle-orm/issues/293) [#301](https://togithub.com/drizzle-team/drizzle-orm/issues/301) [#276](https://togithub.com/drizzle-team/drizzle-orm/issues/276) [#269](https://togithub.com/drizzle-team/drizzle-orm/issues/269) [#253](https://togithub.com/drizzle-team/drizzle-orm/issues/253) [#311](https://togithub.com/drizzle-team/drizzle-orm/issues/311) [#312](https://togithub.com/drizzle-team/drizzle-orm/issues/312)Configuration
š Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
š¦ Automerge: Enabled.
ā» Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
š Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.