Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(deps): update dependency drizzle-orm to v0.30.10 #5

Merged
merged 1 commit into from
May 1, 2024

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented May 1, 2024

Mend Renovate

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
drizzle-orm (source) 0.30.4 -> 0.30.10 age adoption passing confidence

Release Notes

drizzle-team/drizzle-orm (drizzle-orm)

v0.30.10

Compare Source

New Features

🎉 .if() function added to all WHERE expressions
Select all users after cursors if a cursor value was provided
function getUsersAfter(cursor?: number) {
    return db.select().from(users).where(
        gt(users.id, cursor).if(cursor)
    );
}

Bug Fixes

  • Fixed internal mappings for sessions .all, .values, .execute functions in AWS DataAPI

v0.30.9

Compare Source

  • 🐛 Fixed migrator in AWS Data API
  • Added setWhere and targetWhere fields to .onConflictDoUpdate() config in SQLite instead of single where field
  • 🛠️ Added schema information to Drizzle instances via db._.fullSchema

v0.30.8

Compare Source

  • 🎉 Added custom schema support to enums in Postgres (fixes #​669 via #​2048):

⚠️ Only available in drizzle-orm for now, drizzle-kit support will arrive soon

import { pgSchema } from 'drizzle-orm/pg-core';

const mySchema = pgSchema('mySchema');
const colors = mySchema.enum('colors', ['red', 'green', 'blue']);
  • 🎉 Changed D1 migrate() function to use batch API (#​2137)
  • 🐛 Split where clause in Postgres .onConflictDoUpdate method into setWhere and targetWhere clauses, to support both where cases in on conflict ... clause (fixes #​1628, #​1302 via #​2056)
  • 🐛 Fixed query generation for where clause in Postgres .onConflictDoNothing method, as it was placed in a wrong spot (fixes #​1628 via #​2056)
  • 🐛 Fixed multiple issues with AWS Data API driver (fixes #​1931, #​1932, #​1934, #​1936 via #​2119)
  • 🐛 Fix inserting and updating array values in AWS Data API (fixes #​1912 via #​1911)

Thanks @​hugo082 and @​livingforjesus!

v0.30.7

Compare Source

Bug fixes
  • Add mappings for @vercel/postgres package
  • Fix interval mapping for neon drivers - #​1542

v0.30.6

Compare Source

New Features

🎉 PGlite driver Support

PGlite is a WASM Postgres build packaged into a TypeScript client library that enables you to run Postgres in the browser, Node.js and Bun, with no need to install any other dependencies. It is only 2.6mb gzipped.

It can be used as an ephemeral in-memory database, or with persistence either to the file system (Node/Bun) or indexedDB (Browser).

Unlike previous "Postgres in the browser" projects, PGlite does not use a Linux virtual machine - it is simply Postgres in WASM.

Usage Example

import { PGlite } from '@​electric-sql/pglite';
import { drizzle } from 'drizzle-orm/pglite';

// In-memory Postgres
const client = new PGlite();
const db = drizzle(client);

await db.select().from(users);

There are currently 2 limitations, that should be fixed on Pglite side:

v0.30.5

Compare Source

New Features

🎉 $onUpdate functionality for PostgreSQL, MySQL and SQLite

Adds a dynamic update value to the column.
The function will be called when the row is updated, and the returned value will be used as the column value if none is provided.
If no default (or $defaultFn) value is provided, the function will be called when the row is inserted as well, and the returned value will be used as the column value.

Note: This value does not affect the drizzle-kit behavior, it is only used at runtime in drizzle-orm.

const usersOnUpdate = pgTable('users_on_update', {
  id: serial('id').primaryKey(),
  name: text('name').notNull(),
  updateCounter: integer('update_counter').default(sql`1`).$onUpdateFn(() => sql`update_counter + 1`),
  updatedAt: timestamp('updated_at', { mode: 'date', precision: 3 }).$onUpdate(() => new Date()),
  alwaysNull: text('always_null').$type<string | null>().$onUpdate(() => null),
});

Fixes

  • [BUG]: insertions on columns with the smallserial datatype are not optional - #​1848

Thanks @​Angelelz and @​gabrielDonnantuoni!


Configuration

📅 Schedule: Branch creation - "before 4am" (UTC), 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 has been generated by Mend Renovate. View repository job log here.

@renovate renovate bot added the bump label May 1, 2024
@renovate renovate bot force-pushed the renovate/drizzle-orm-0.x branch from 7f07f47 to fc4f6ce Compare May 1, 2024 18:01
@renovate renovate bot force-pushed the renovate/drizzle-orm-0.x branch from fc4f6ce to fee2c2b Compare May 1, 2024 18:02
@kravetsone kravetsone merged commit b73ec67 into main May 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant