Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(client): allow prisma.empty to $executeRaw & $queryRaw #13656

Merged
merged 32 commits into from
Jun 23, 2022

Conversation

danstarns
Copy link
Contributor

@danstarns danstarns commented Jun 6, 2022

Closes: #11233

Having issues passing an empty sql stmt to the db and so return null when its empty.

@danstarns danstarns changed the title fix: allow prisma.empty to $executeRaw fix(client): allow prisma.empty to $executeRaw Jun 6, 2022
@danstarns danstarns requested a review from a team June 8, 2022 12:26
@aqrln aqrln added this to the 4.0.x milestone Jun 8, 2022
Copy link
Member

@aqrln aqrln left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good overall, just a couple of comments

packages/client/tests/functional/empty-to-raw/tests.ts Outdated Show resolved Hide resolved
packages/client/src/runtime/getPrismaClient.ts Outdated Show resolved Hide resolved
Copy link
Member

@millsp millsp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The same problem applies to $queryRaw, I believe.

packages/client/src/runtime/getPrismaClient.ts Outdated Show resolved Hide resolved
@danstarns danstarns changed the title fix(client): allow prisma.empty to $executeRaw fix(client): allow prisma.empty to $executeRaw & $queryRaw Jun 13, 2022
Co-authored-by: pierre <pierreantoine.urvoy@gmail.com>
@danstarns danstarns requested review from aqrln and millsp and removed request for millsp June 13, 2022 06:15
Copy link
Member

@millsp millsp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

danstarns and others added 2 commits June 22, 2022 16:41
Co-authored-by: pierre <pierreantoine.urvoy@gmail.com>
Co-authored-by: pierre <pierreantoine.urvoy@gmail.com>
@danstarns danstarns enabled auto-merge (squash) June 23, 2022 08:18
danstarns and others added 2 commits June 23, 2022 09:25
Co-authored-by: Joël Galeran <Jolg42@users.noreply.github.com>
Co-authored-by: Joël Galeran <Jolg42@users.noreply.github.com>
@danstarns danstarns requested a review from millsp June 23, 2022 10:50
@danstarns danstarns merged commit 513f3e8 into prisma:main Jun 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cannot pass Prisma.empty to $executeRaw function
4 participants