prisma v8.0.0-rc.7

v8.0.0-rc.7Pre-release
Changed 2
  • ORM pagination methods renamed from `.take(n)` and `.skip(n)` to `.limit(n)` and `.offset(n)` on SQL and Mongo ORM collections, including relation refinements and grouped SQL collections
  • The engine peer dependency moves to @prisma/cli-engine@0.2.3
Removed 1
  • The old `.take(n)` and `.skip(n)` pagination methods are removed from ORM collections

From prisma

ORM collection pagination renames to limit/offset, and the toolchain releases against @prisma/cli-engine@0.2.3, the engine whose config loader ships the prisma init scaffold fixes from the unified CLI's rc line.

The upgrade recipe for this hop: the user recipe.

Breaking changes
  • ORM pagination is limit/offset, not take/skip.take(n) and .skip(n) are renamed to .limit(n) and .offset(n) on SQL and Mongo ORM collections, including relation refinements and grouped SQL collections; the old names are removed. Semantics are unchanged. Mongo's lower-level query builder keeps .skip(n) — it names the native $skip pipeline stage, not the collection API. (#30112)

    Before:

    await db.orm.User.orderBy((u) => u.id.asc()).skip(10).take(10).all();
    

    After:

    await db.orm.User.orderBy((u) => u.id.asc()).offset(10).limit(10).all();
    
  • The engine peer moves to @prisma/cli-engine@0.2.3@prisma/orm-toolchain declares the unified CLI's engine as an exact peer, and this release peers 0.2.3 (up from 0.2.2). Installs assembled by the unified prisma CLI resolve one engine as before; a host that pins the engine itself must move to 0.2.3. (prisma/prisma-cli#225, prisma/prisma-cli#227)

View original

Upgraded? How did it go?

Discussion