docs(skills): teach the PSL expression-index form Prisma Next 0.17 added - #897
Open
coderdan wants to merge 1 commit into
Open
docs(skills): teach the PSL expression-index form Prisma Next 0.17 added#897coderdan wants to merge 1 commit into
coderdan wants to merge 1 commit into
Conversation
Since 0.17, `@@index` takes an `expression` argument, so the eql_v3.* functional indexes belong in schema.prisma rather than hand-written rawSql operations — the claim that PSL cannot express them predates the upgrade merged in #749. rawSql keeps the ANALYZE (no PSL form exists) and stays documented as the fallback for DDL PSL cannot carry, e.g. CONCURRENTLY. Closes #895
🦋 Changeset detectedLatest commit: 513d6d8 The changes in this PR will be included in the next version bump. This PR includes changesets to release 11 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #895.
The
stash-prismaskill's "Indexing encrypted columns" section claimedschema.prismacannot express functional indexes and prescribed hand-writtenrawSqloperations as the only path. True on 0.16; false since #749 moved us to Prisma Next 0.17.Verified against the installed
@prisma/orm-family-sql@0.17.0dist (interpreter'sindexModelSpec):@@indexacceptsexpression,where,unique,name/map,type,options, with three enforced rules — expression XOR fields, expression requiresname/map,optionsrequirestype. The expression string is the whole element list between theCREATE INDEXparens, inserted verbatim (target-postgrespgRenderCreateIndex).Changes:
skills/stash-prisma: the four capability recipes are now@@index(expression:)blocks inschema.prisma; the interpreter's three rules are stated; the Json recipe explains why it carries its own parens and opclass.rawSqlstays forANALYZE(PSL has no form for it — an expression index has no statistics until it runs) and as the fallback for DDL PSL can't carry (CREATE INDEX CONCURRENTLY).skills/stash-indexing: the per-integration pointer for Prisma Next updated from "schema language cannot express functional indexes" to the@@index(expression:)form.stashpatch —skills/ships in the tarball.Auto-deriving these indexes from the codec (no user-authored index at all) is #896.