prisma-client-api-filters

tarafından prisma

Filtre Koşulları ve Operatörler

npx skills add https://github.com/prisma/cursor-plugin --skill prisma-client-api-filters

Filter Conditions and Operators

Filter operators for the where clause.

Equality

// Exact match (implicit)
where: { email: 'alice@prisma.io' }

// Explicit equals
where: { email: { equals: 'alice@prisma.io' } }

// Not equal
where: { email: { not: 'alice@prisma.io' } }

Comparison

// Greater than
where: { age: { gt: 18 } }

// Greater than or equal
where: { age: { gte: 18 } }

// Less than
where: { age: { lt: 65 } }

// Less than or equal
where: { age: { lte: 65 } }

// Combined
where: { age: { gte: 18, lte: 65 } }

Lists

// In array
where: { role: { in: ['ADMIN', 'MODERATOR'] } }

// Not in array
where: { role: { notIn: ['GUEST', 'BANNED'] } }

String Filters

// Contains
where: { email: { contains: 'prisma' } }

// Starts with
where: { email: { startsWith: 'alice' } }

// Ends with
where: { email: { endsWith: '@prisma.io' } }

// Case-insensitive (default for some databases)
where: { 
  email: { 
    contains: 'PRISMA',
    mode: 'insensitive' 
  } 
}

Null Checks

// Is null
where: { deletedAt: null }

// Is not null
where: { deletedAt: { not: null } }

// Using isSet (for optional fields)
where: { middleName: { isSet: true } }

Logical Operators

AND (implicit)

// Multiple conditions = AND
where: {
  email: { contains: '@prisma.io' },
  role: 'ADMIN'
}

AND (explicit)

where: {
  AND: [
    { email: { contains: '@prisma.io' } },
    { role: 'ADMIN' }
  ]
}

OR

where: {
  OR: [
    { email: { contains: '@gmail.com' } },
    { email: { contains: '@prisma.io' } }
  ]
}

NOT

where: {
  NOT: {
    role: 'GUEST'
  }
}

// Multiple NOT conditions
where: {
  NOT: [
    { role: 'GUEST' },
    { verified: false }
  ]
}

Combined

where: {
  AND: [
    { verified: true },
    {
      OR: [
        { role: 'ADMIN' },
        { role: 'MODERATOR' }
      ]
    }
  ],
  NOT: { deletedAt: { not: null } }
}

Relation Filters

some

At least one related record matches:

// Users with at least one published post
where: {
  posts: {
    some: { published: true }
  }
}

every

All related records match:

// Users where all posts are published
where: {
  posts: {
    every: { published: true }
  }
}

none

No related records match:

// Users with no published posts
where: {
  posts: {
    none: { published: true }
  }
}

is / isNot (1-to-1)

// Users with profile in specific country
where: {
  profile: {
    is: { country: 'USA' }
  }
}

// Users without profile
where: {
  profile: {
    isNot: null
  }
}

Array Field Filters

For fields like String[]:

// Has element
where: { tags: { has: 'typescript' } }

// Has some elements
where: { tags: { hasSome: ['typescript', 'javascript'] } }

// Has every element
where: { tags: { hasEvery: ['typescript', 'prisma'] } }

// Is empty
where: { tags: { isEmpty: true } }

JSON Filters

// Path-based filter
where: {
  metadata: {
    path: ['settings', 'theme'],
    equals: 'dark'
  }
}

// String contains in JSON
where: {
  metadata: {
    path: ['bio'],
    string_contains: 'developer'
  }
}

Full-Text Search

// Requires @@fulltext index
where: {
  content: {
    search: 'prisma database'
  }
}

prisma tarafından daha fazla skill

prisma-cli-migrate-reset
prisma
prisma migrate reset
official
prisma-cli-validate
prisma
prisma doğrulama. Bu Prisma özelliğini kullanırken başvuru yapın.
official
prisma-next-extension-upgrade
prisma
Upgrade Prisma Next in your extension. Bumps every `@prisma-next/*` dependency to the requested target (or npm `latest`), runs the per-transition upgrade…
official
adr-review
prisma
Bir veya daha fazla ADR'yi yeni bir gözle (önceden bağlamı olmayan bir ekip üyesi olarak) inceleyin, anlatı ve yapısal sorunları belirleyin, ardından yeniden yazın. Şu durumlarda kullanın…
official
prisma-next-upgrade
prisma
Upgrade Prisma Next in your app. Bumps every `@prisma-next/*` dependency from the version pinned in the lockfile to the requested target (or npm `latest`),…
official
prisma-cli
prisma
Prisma CLI komutları, seçenekleri ve iş akışları için kurulum, geçişler ve veritabanı işlemlerini kapsayan eksiksiz referans. Önceliğe göre düzenlenmiş 20'den fazla komutu içerir: kurulum (init), oluşturma (generate), geliştirme (dev), veritabanı işlemleri (db pull/push/seed/execute) ve geçişler (migrate dev/deploy/reset/status/diff/resolve). Prisma 7.x değişikliklerini içerir: yeni prisma.config.ts yapılandırma dosyası, kaldırılan bayraklar (--skip-generate, --skip-seed, --schema, --url) ve açık...
official
prisma-client-api
prisma
Prisma Client API referansının tamamı: model sorguları, CRUD işlemleri, filtreleme, ilişkiler ve işlemler. findUnique, findMany, create, update, delete, upsert ve dönüş varyantlarıyla toplu işlemler dahil 17 model sorgulama yöntemini kapsar. Sonuçları şekillendirmek için select, include, omit, orderBy, take, skip, cursor ve distinct sorgu seçenekleri sunar. Eşitlik, içerme, başlangıç, küçüktür, büyüktür gibi skaler ve mantıksal filtre operatörlerinin yanı sıra some gibi ilişki filtrelerini içerir.
official
prisma-compute
prisma
Prisma Compute deployment and hosting guide. Use whenever the user mentions Prisma Compute, `prisma.compute.ts`, `defineComputeConfig`, deploying or hosting a Prisma app, `@prisma/cli app deploy`, `compute:deploy`, `create-prisma --deploy`, `PRISMA_SERVICE_TOKEN`, `auth workspace`, Compute apps/deployments/build logs/domains, `@prisma/cli agent install`, localhost vs `0.0.0.0`, deploy port binding, or framework deploy readiness for Hono, Elysia, Next.js, TanStack Start, Astro, Nuxt, Svelte,...
developmentdevopsofficial