
Security News
vlt Launches "reproduce": A New Tool Challenging the Limits of Package Provenance
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
@prisma/prisma-read-replica-middleware
Advanced tools
We have provided this middleware as an example only, and without warranty. It is not intended for use in a production environment. Please consider the limitations documented below before adding it to your application.
Find implementation examples here.
npm i @prisma/prisma-read-replica-middleware --save
schema.prisma
called read-replica-schema.prisma
.read-replica-schema.prisma
add only generator
and datasource
blocks.generator
block, set output
to read-replica-client
.datasource
block, add the URL of your read replica database.prisma-read-replica generate
to generate the Read Replica client.new PrismaClient()
, instantiate PrismaReadReplica
and apply it with $use
. For example:import { Prisma, PrismaClient } from '@prisma/client'
import PrismaReadReplicaMiddleware from 'prisma-read-replica-middleware';
const modelsToExclude = ['User'];
prisma.$use(PrismaReadReplicaMiddleware(modelsToExclude));
User
is an excluded model.import { Prisma, PrismaClient } from '@prisma/client'
import PrismaReadReplicaMiddleware from 'prisma-read-replica';
const prisma = new PrismaClient({
log: ['query', 'info', 'warn', 'error'],
});
const modelsToExclude = ['User'];
prisma.$use(PrismaReadReplicaMiddleware(modelsToExclude));
const getUsers = await prisma.user.findMany({
where: {
email: {
contains: 'test',
},
},
include: {
post: true,
},
})
FAQs
Unknown package
The npm package @prisma/prisma-read-replica-middleware receives a total of 0 weekly downloads. As such, @prisma/prisma-read-replica-middleware popularity was classified as not popular.
We found that @prisma/prisma-read-replica-middleware demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 13 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
Research
Security News
Socket researchers uncovered a malicious PyPI package exploiting Deezer’s API to enable coordinated music piracy through API abuse and C2 server control.
Research
The Socket Research Team discovered a malicious npm package, '@ton-wallet/create', stealing cryptocurrency wallet keys from developers and users in the TON ecosystem.