Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
paginate-prisma
Advanced tools
[![Maintainability](https://api.codeclimate.com/v1/badges/6b08ca1cc22333d5e1be/maintainability)](https://codeclimate.com/github/qlaffont/paginate-prisma/maintainability) [![Test Coverage](https://api.codeclimate.com/v1/badges/6b08ca1cc22333d5e1be/test_cov
A TS plugin wrapping pagination for Prisma ORM. Old Owner: @flexper
pnpm i paginate-prisma
import { paginate, PAGINATION_ORDER } from 'paginate-prisma';
const prisma = new PrismaClient();
await paginate(prisma.user)(
{},
{
sort: {
field: 'tokens._count',
order: PAGINATION_ORDER.ASC,
},
}
);
For type-graphql integration, check example/type.ts
Options
Field Name | Type | Description |
---|---|---|
prismaModel | Prisma Model | Prisma model/table/entity to use |
sortingOptions | PaginationOptions | Options to use for pagination (Page, sorting, etc) |
additionalFindMany | Prisma FindManyArgument | Other params in findMany as include, cursor, etc |
Return Promise<PaginationResult & {data: T[]}>
Field Name | Type | Description |
---|---|---|
data | T[] | Paginated Data |
page | number | Current page |
pages | number | Total number of pages |
limit | number | Number of row to be returned |
items | number | Total number of items |
To test this package, you need to run a PostgresSQL server :
docker-compose up -d
chmod -R 777 docker
pnpm prisma migrate deploy
pnpm test
This package use TSdx. Please check documentation to update this package.
FAQs
[![Maintainability](https://api.codeclimate.com/v1/badges/6b08ca1cc22333d5e1be/maintainability)](https://codeclimate.com/github/qlaffont/paginate-prisma/maintainability) [![Test Coverage](https://api.codeclimate.com/v1/badges/6b08ca1cc22333d5e1be/test_cov
We found that paginate-prisma demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 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.
Research
Security News
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.