24 lines
656 B
Markdown
24 lines
656 B
Markdown
- 🎉 Added support for locking clauses in SELECT (`SELECT ... FOR UPDATE`):
|
|
|
|
PostgreSQL
|
|
|
|
```ts
|
|
await db
|
|
.select()
|
|
.from(users)
|
|
.for('update')
|
|
.for('no key update', { of: users })
|
|
.for('no key update', { of: users, skipLocked: true })
|
|
.for('share', { of: users, noWait: true });
|
|
```
|
|
|
|
MySQL
|
|
|
|
```ts
|
|
await db.select().from(users).for('update');
|
|
await db.select().from(users).for('share', { skipLocked: true });
|
|
await db.select().from(users).for('update', { noWait: true });
|
|
```
|
|
|
|
- 🎉🐛 Custom column types now support returning `SQL` from `toDriver()` method in addition to the `driverData` type from generic.
|