Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 14 additions & 2 deletions apps/docs/content/docs/orm/prisma-client/queries/crud.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: CRUD
description: 'Learn how to perform create, read, update, and delete operations'
description: "Learn how to perform create, read, update, and delete operations"
url: /orm/prisma-client/queries/crud
metaTitle: CRUD (Reference)
metaDescription: How to perform CRUD with Prisma Client.
Expand Down Expand Up @@ -115,9 +115,21 @@ const users = await prisma.user.findMany({
posts: { some: { published: false } },
},
});

// Filter by geometry (PostgreSQL with PostGIS)
const nearbyLocations = await prisma.location.findMany({
where: {
position: {
near: {
point: [13.4, 52.5],
maxDistance: 1000, // meters
},
},
},
});
```

See [Filtering and sorting](/v6/orm/prisma-client/queries/filtering-and-sorting) for more examples.
See [Filtering and sorting](/v6/orm/prisma-client/queries/filtering-and-sorting) for more examples, or [Working with geometry fields](/orm/prisma-client/special-fields-and-types/working-with-geometry-fields) for spatial queries.

### Select fields

Expand Down
Loading