Skip to content

Comments

fix: add object_expression/object_member support to reformatter#5776

Merged
jacek-prisma merged 3 commits intoprisma:mainfrom
backend-hyoseok:fix/reformat-object-expression
Feb 16, 2026
Merged

fix: add object_expression/object_member support to reformatter#5776
jacek-prisma merged 3 commits intoprisma:mainfrom
backend-hyoseok:fix/reformat-object-expression

Conversation

@backend-hyoseok
Copy link
Contributor

fix: add object_expression/object_member support to reformatter

Summary

The reformatter was missing handlers for object_expression and object_member rules, causing it to always fail when encountering object literals (e.g. partial index where clauses).

Changes

  • psl/schema-ast/src/reformat.rs : Add reformat_object_expression and reformat_object_member functions
  • psl/psl/tests/reformatter/ : Add corresponding test fixtures for object_expression and object_member.

fix: prisma/prisma#29180

The reformatter was missing handlers for `object_expression` and
`object_member` rules, causing it to always fail when encountering
object literals (e.g. partial index `where` clauses).

Add `reformat_object_expression` and `reformat_object_member` functions
and corresponding test fixtures for partial indexes.
@CLAassistant
Copy link

CLAassistant commented Feb 16, 2026

CLA assistant check
All committers have signed the CLA.

@codspeed-hq
Copy link

codspeed-hq bot commented Feb 16, 2026

Merging this PR will not alter performance

✅ 11 untouched benchmarks
⏩ 11 skipped benchmarks1


Comparing backend-hyoseok:fix/reformat-object-expression (5affa8e) with main (0cae7ae)

Open in CodSpeed

Footnotes

  1. 11 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

@jacek-prisma jacek-prisma merged commit 3f49263 into prisma:main Feb 16, 2026
89 of 98 checks passed
renovate bot added a commit to ettorepuccetti/terrarossa that referenced this pull request Feb 20, 2026
This PR contains the following updates:

| Package | Change |
[Age](https://docs.renovatebot.com/merge-confidence/) |
[Confidence](https://docs.renovatebot.com/merge-confidence/) |
|---|---|---|---|
| [@prisma/adapter-pg](https://redirect.github.com/prisma/prisma)
([source](https://redirect.github.com/prisma/prisma/tree/HEAD/packages/adapter-pg))
| [`7.2.0` →
`7.4.1`](https://renovatebot.com/diffs/npm/@prisma%2fadapter-pg/7.2.0/7.4.1)
|
![age](https://developer.mend.io/api/mc/badges/age/npm/@prisma%2fadapter-pg/7.4.1?slim=true)
|
![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@prisma%2fadapter-pg/7.2.0/7.4.1?slim=true)
|
| [@prisma/client](https://www.prisma.io)
([source](https://redirect.github.com/prisma/prisma/tree/HEAD/packages/client))
| [`7.2.0` →
`7.4.1`](https://renovatebot.com/diffs/npm/@prisma%2fclient/7.2.0/7.4.1)
|
![age](https://developer.mend.io/api/mc/badges/age/npm/@prisma%2fclient/7.4.1?slim=true)
|
![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@prisma%2fclient/7.2.0/7.4.1?slim=true)
|
| [prisma](https://www.prisma.io)
([source](https://redirect.github.com/prisma/prisma/tree/HEAD/packages/cli))
| [`7.2.0` →
`7.4.1`](https://renovatebot.com/diffs/npm/prisma/7.2.0/7.4.1) |
![age](https://developer.mend.io/api/mc/badges/age/npm/prisma/7.4.1?slim=true)
|
![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/prisma/7.2.0/7.4.1?slim=true)
|

---

### Release Notes

<details>
<summary>prisma/prisma (@&#8203;prisma/adapter-pg)</summary>

###
[`v7.4.1`](https://redirect.github.com/prisma/prisma/releases/tag/7.4.1)

[Compare
Source](https://redirect.github.com/prisma/prisma/compare/7.4.0...7.4.1)

Today, we are issuing a 7.4.1 patch release focused on bug fixes and
quality improvements.

#### 🛠 Fixes

**Prisma Client**

- Fix cursor-based pagination regression with parameterised values
([#&#8203;29184](https://redirect.github.com/prisma/prisma/pull/29184))
- Preserve `Prisma.skip` through query extension argument cloning
([#&#8203;29198](https://redirect.github.com/prisma/prisma/pull/29198))
- Enable batching of multiple queries inside interactive transactions
([#&#8203;25571](https://redirect.github.com/prisma/prisma/pull/25571))
- Add missing JSON value deserialization for JSONB parameter fields
([#&#8203;29182](https://redirect.github.com/prisma/prisma/pull/29182))
- Apply result extensions correctly for nested and fluent relations
([#&#8203;29218](https://redirect.github.com/prisma/prisma/pull/29218))
- Allow missing config datasource URL and validate only when needed
([prisma/prisma-engines#5777](https://redirect.github.com/prisma/prisma-engines/pull/5777))

**Driver Adapters**

-
**[@&#8203;prisma/adapter-ppg](https://redirect.github.com/prisma/adapter-ppg)**:
Handle null values in type parsers for nullable columns
([#&#8203;29192](https://redirect.github.com/prisma/prisma/pull/29192))

**Prisma Schema Language**

- Support `where` argument on field-level `@unique` for partial indexes
([prisma/prisma-engines#5774](https://redirect.github.com/prisma/prisma-engines/pull/5774))
- Add object expression and object member support to schema reformatter
([prisma/prisma-engines#5776](https://redirect.github.com/prisma/prisma-engines/pull/5776))

#### 🙏 Huge thanks to our community

Many of the fixes in this release were contributed by our amazing
community members. We're grateful for your continued support and
contributions that help make Prisma better for everyone!

###
[`v7.4.0`](https://redirect.github.com/prisma/prisma/releases/tag/7.4.0)

[Compare
Source](https://redirect.github.com/prisma/prisma/compare/7.3.0...7.4.0)

Today, we are excited to share the `7.4.0` stable release 🎉

**🌟 Star this repo for notifications about new releases, bug fixes &
features — or [follow us on X](https://pris.ly/x)!**

### Highlights

#### ORM

##### Caching in Prisma Client

Today’s release is a big one, as we introduce a new caching layer into
Prisma ORM. But why the need for a caching layer?

In Prisma 7, the query compiler runs as a WebAssembly module directly on
the JavaScript main thread. While this simplified the architecture by
eliminating the separate engine process, it introduced a trade-off:
every query now synchronously blocks the event loop during compilation.

For individual queries, compilation takes between 0.1ms and 1ms, which
is barely noticeable in isolation. But under high concurrency this
overhead adds up and creates event loop contention that affects overall
application throughput.

For instance, say we have a query that is run over and over, but is a
similar shape:

```tsx
// These two queries have the same shape:
const alice = await prisma.user.findUnique({ where: { email: 'alice@prisma.io' } })
const bob = await prisma.user.findUnique({ where: { email: 'bob@prisma.io' } })
```

Prior to v7.4.0, this would be reevaluated ever time the query is run.
Now, Prisma Client will extract the user-provided values and replaces
them with typed placeholders, producing a normalized query shape:

```
prisma.user.findUnique({ where: { email: %1 } })   // cache key
                                         ↑
                              %1 = 'alice@prisma.io'  (or 'bob@prisma.io')
```

This normalized shape is used as a cache key. On the first call, the
query is compiled as usual and the resulting plan is stored in an LRU
cache. On every subsequent call with the same query shape, regardless of
the actual values, the cached plan is reused instantly without invoking
the compiler.

We have more details on the impact of this change and some deep dives
into Prisma architecture in an upcoming blog post!

##### Partial Indexes (Filtered Indexes) Support

We're excited to announce **Partial Indexes** support in Prisma! This
powerful community-contributed feature allows you to create indexes that
only include rows matching specific conditions, significantly reducing
index size and improving query performance.

Partial indexes are available behind the `partialIndexes` preview
feature for PostgreSQL, SQLite, SQL Server, and CockroachDB, with full
migration and introspection support.

**Basic usage**

Enable the preview feature in your schema:

```groovy
generator client {
  provider        = "prisma-client-js"
  previewFeatures = ["partialIndexes"]
}
```

**Raw SQL syntax**

For maximum flexibility, use the `raw()` function with database-specific
predicates:

```groovy
model User {
  id       Int     @&#8203;id
  email    String
  status   String

  @&#8203;@&#8203;unique([email], where: raw("status = 'active'"))
  @&#8203;@&#8203;index([email], where: raw("deletedAt IS NULL"))
}
```

**Type-safe object syntax**

For better type safety, use the object literal syntax for simple
conditions:

```groovy
model Post {
  id        Int      @&#8203;id
  title     String
  published Boolean

  @&#8203;@&#8203;index([title], where: { published: true })
  @&#8203;@&#8203;unique([title], where: { published: { not: false } })
}
```

##### Bug Fixes

Most of these fixes are **community contributions** - thank you to our
amazing contributors!

-
[**prisma/prisma-engines#5767**](https://redirect.github.com/prisma/prisma-engines/pull/5767):
Fixed an issue with PostgreSQL migration scripts that prevented usage of
`CREATE INDEX CONCURRENTLY` in migrations
-
[**prisma/prisma-engines#5752**](https://redirect.github.com/prisma/prisma-engines/pull/5752):
Fixed BigInt precision loss in JSON aggregation for MySQL and
CockroachDB by casting BigInt values to text (from community member
[polaz](https://redirect.github.com/polaz))
-
[**prisma/prisma-engines#5750**](https://redirect.github.com/prisma/prisma-engines/pull/5750):
Fixed connection failures with non-ASCII database names by properly
URL-decoding database names in connection strings
-
[**#&#8203;29155**](https://redirect.github.com/prisma/prisma/pull/29155):
Fixed silent transaction commit errors in PlanetScale adapter by
ensuring COMMIT failures are properly propagated
-
[**#&#8203;29141**](https://redirect.github.com/prisma/prisma/pull/29141):
Resolved race condition errors (EREQINPROG) in SQL Server adapter by
serializing commit/rollback operations using mutex synchronization
-
[**#&#8203;29158**](https://redirect.github.com/prisma/prisma/pull/29158):
Fixed MSSQL connection string parsing to properly handle curly brace
escaping for passwords containing special characters

#### Open roles at Prisma

Interested in joining Prisma? We’re growing and have several exciting
opportunities across the company for developers who are passionate about
building with Prisma. Explore our open positions on our [Careers
page](https://www.prisma.io/careers#current) and find the role that’s
right for you.

#### Enterprise support

Thousands of teams use Prisma and many of them already tap into our
Enterprise & Agency Support Program for hands-on help with everything
from schema integrations and performance tuning to security and
compliance.

With this program you also get priority issue triage and bug fixes,
expert scalability advice, and custom training so that your
Prisma-powered apps stay rock-solid at any scale. Learn more or
join: <https://prisma.io/enterprise>.

###
[`v7.3.0`](https://redirect.github.com/prisma/prisma/releases/tag/7.3.0)

[Compare
Source](https://redirect.github.com/prisma/prisma/compare/7.2.0...7.3.0)

Today, we are excited to share the `7.3.0` stable release 🎉

**🌟 Star this repo for notifications about new releases, bug fixes &
features — or [follow us on X](https://pris.ly/x)!**

#### ORM

- [#&#8203;28976](https://redirect.github.com/prisma/prisma/pull/28976):
Fast and Small Query Compilers
We've been working on various performance-related bugs since the initial
ORM 7.0 release. With 7.3.0, we're introducing a new `compilerBuild`
option for the client generator block in `schema.prisma` with two
options: `fast` and `small`. This allows you to swap the underlying
Query Compiler engine based on your selection, one built for speed (with
an increase in size), and one built for size (with the trade off for
speed). By default, the `fast` mode is used, but this can be set by the
user:

```groovy
generator client {
  provider = "prisma-client"
  output   = "../src/generated/prisma"
  compilerBuild = "fast" // "fast" | "small"
}
```

We still have more in progress for performance, but this new
`compilerBuild` option is our first step toward addressing your
concerns!

- [#&#8203;29005](https://redirect.github.com/prisma/prisma/pull/29005):
Bypass the Query Compiler for Raw Queries
Raw queries (`$executeRaw`, `$queryRaw`) can now skip going through the
query compiler and query interpreter infrastructure. They can be sent
directly to the driver adapter, removing additional overhead.

- [#&#8203;28965](https://redirect.github.com/prisma/prisma/pull/28965):
Update MSSQL to v12.2.0
This community PR updates the `@prisma/adapter-mssql` to use MSSQL
v12.2.0. Thanks
[Jay-Lokhande](https://redirect.github.com/Jay-Lokhande)!

- [#&#8203;29001](https://redirect.github.com/prisma/prisma/pull/29001):
Pin better-sqlite3 version to avoid SQLite bug
An underlying bug in SQLite 3.51.0 has affected the `better-sqlite3`
adapter. We’ve bumped the version that powers `@prisma/better-sqlite3`
and have pinned the version to prevent any unexpected issues. If you are
using `@prisma/better-sqlite3` , please upgrade to v7.3.0.

- [#&#8203;29002](https://redirect.github.com/prisma/prisma/pull/29002):
Revert `@map` enums to v6.19.0 behavior
In the initial release of v7.0, we made a change with Mapped Enums where
the generated enum would get its value from the value passed to the
`@map` function. This was a breaking change from v6 that caused issues
for many users. We have reverted this change for the time being, as many
different diverging approaches have emerged from the community
discussion.

-
[prisma-engines#5745](https://redirect.github.com/prisma/prisma-engines/pull/5745):
Cast BigInt to text in JSON aggregation
When using `relationJoins` with BigInt fields in Prisma 7,
JavaScript's `JSON.parse` loses precision for integers larger
than `Number.MAX_SAFE_INTEGER` (2^53 - 1). This happens because
PostgreSQL's `JSONB_BUILD_OBJECT` returns BigInt values as JSON numbers,
which JavaScript cannot represent precisely.

  ```
  // Original BigInt ID: 312590077454712834
  // After JSON.parse: 312590077454712830 (corrupted!)
  ```

This PR cast BigInt columns
to `::text` inside `JSONB_BUILD_OBJECT` calls, similar to how `MONEY` is
already cast to `::numeric`.

  ```
  -- Before
  JSONB_BUILD_OBJECT('id', "id")

  -- After
  JSONB_BUILD_OBJECT('id', "id"::text)
  ```

This ensures BigInt values are returned as JSON strings, preserving full
precision when parsed in JavaScript.

#### Open roles at Prisma

Interested in joining Prisma? We’re growing and have several exciting
opportunities across the company for developers who are passionate about
building with Prisma. Explore our open positions on our \[[Careers
page](https://www.prisma.io/careers#current)]\(<https://www.prisma.io/careers#current>) and
find the role that’s right for you.

#### Enterprise support

Thousands of teams use Prisma and many of them already tap into our
Enterprise & Agency Support Program for hands-on help with everything
from schema integrations and performance tuning to security and
compliance.

With this program you also get priority issue triage and bug fixes,
expert scalability advice, and custom training so that your
Prisma-powered apps stay rock-solid at any scale. Learn more or
join: <https://prisma.io/enterprise>.

</details>

---

### Configuration

📅 **Schedule**: Branch creation - "before 10am on Friday" (UTC),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Enabled.

♻ **Rebasing**: Whenever PR is behind base branch, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about these
updates again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR was generated by [Mend Renovate](https://mend.io/renovate/).
View the [repository job
log](https://developer.mend.io/github/ettorepuccetti/terrarossa).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0My4yNS4xMSIsInVwZGF0ZWRJblZlciI6IjQzLjI1LjExIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

prisma generate panics with partialIndexes and simple boolean where clause ({ published: false })

3 participants