Prisma

22.01.09 select fields(정리중)

슈팅스타제제 2022. 1. 9. 19:47

선택한 필드만 가져오기!

prisma.find 쿼리에서만 사용 가능 필터 속성인 것 같다. 

 

prisma.update 쿼리에서 사용 가능한 필터 속성은 

connect: relation 속성을 추가하는 것인가?

connectOrCreate: 연결해서 데이터 추가하기?

 

 

참고문서링크:

https://www.prisma.io/docs/concepts/components/prisma-client/select-fields

 

Select fields (Concepts)

This page explains how to select only a subset of a model's fields and/or include relations ("eager loading") in a Prisma Client query.

www.prisma.io

https://stackoverflow.com/questions/69679956/nestjs-prisma-orm-using-select-versus-include-when-fetching-data-records

 

NestJS Prisma ORM - Using 'select' versus 'include' when fetching data records?

I'm trying to fetch data records from a Postgres database in NestJS (Node.JS environment). I'm using Prisma as my Object Relational Mapper (ORM) in TypeScript. I'm having trouble choosing which que...

stackoverflow.com

 

'Prisma' 카테고리의 다른 글

22.01.09 [prisma] relations  (0) 2022.01.10
22.01.09 실용적인 프리즈마 예제 공유  (0) 2022.01.09
22.01.09 [prisma] CRUD update query  (0) 2022.01.09
22.01.05 [prisma] Date.now()와 new Date()  (0) 2022.01.05
21.11.11 pagination  (0) 2021.11.12