You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hey everyone! I've recently seen an issue in the official Prisma GitHub repository asking for pg_trgm support, then encountered the same necessity with my use-cases of Prisma, so I thought about implementing it in Prisma Util.
Design
As all features that modify the way that Prisma Util processes files, this feature will be marked as Experimental as well (or opt-in if you will). To get started, you'd need to add the following to your configuration file (using the new .mjs syntax coming in v1.3.0):
In this case, Prisma Util will create a GIN index for the model User in the file named schema.prisma for the name column.
Implementation
Prisma Util is already capable of enhanced parsing, so my idea was to add an @Unsupported("TSVECTOR") field to the schema, as well as install pg_trgm and create GIN or GiST (configured per field via the configuration file) indexes.
Code
This is the biggest problem right now and I'd love some feedback on how you'd want this feature to operate. I would say that a middleware is best, as it requires the least amount of setup and it's pretty easy to implement as well.
Wrapping Up
Please let me know what you expect from this feature and how you think that it should be used.
The text was updated successfully, but these errors were encountered:
pg_trgm Support
Hey everyone! I've recently seen an issue in the official Prisma GitHub repository asking for
pg_trgm
support, then encountered the same necessity with my use-cases of Prisma, so I thought about implementing it in Prisma Util.Design
As all features that modify the way that Prisma Util processes files, this feature will be marked as Experimental as well (or opt-in if you will). To get started, you'd need to add the following to your configuration file (using the new
.mjs
syntax coming in v1.3.0):In this case, Prisma Util will create a GIN index for the model User in the file named schema.prisma for the name column.
Implementation
Prisma Util is already capable of enhanced parsing, so my idea was to add an
@Unsupported("TSVECTOR")
field to the schema, as well as installpg_trgm
and create GIN or GiST (configured per field via the configuration file) indexes.Code
This is the biggest problem right now and I'd love some feedback on how you'd want this feature to operate. I would say that a middleware is best, as it requires the least amount of setup and it's pretty easy to implement as well.
Wrapping Up
Please let me know what you expect from this feature and how you think that it should be used.
The text was updated successfully, but these errors were encountered: