Skip to content

Conversation

LinusU
Copy link

@LinusU LinusU commented Aug 27, 2025

Opening this for some early feedback, my end goal is to be able to use the database timestamps when running UPDATE commands. I know that there is an issue for this on the Prisma issue tracker, but after searching for almost an hour I gave up trying to find it 😓 Searching for "now" gives a ton of results...

Our code is litered with $executeRaw with something like: UPDATE ... SET "deletedAt" = NOW() WHERE ....

My goal is to be able to replace this with something like:

import { Now } from '@prisma/client'

// ...

await prisma.foobar.update({
  where: ...
  data: { deletedAt: Now }
})

Any pointers and feedback greatly appreciated! 🙌

@CLAassistant
Copy link

CLAassistant commented Aug 27, 2025

CLA assistant check
All committers have signed the CLA.

@LinusU
Copy link
Author

LinusU commented Aug 27, 2025

Currently stuck on running the tests locally, and unfortunately don't have more time today, will pick up another day!

note to self: I've run . ./.envrc, make dev-postgres13, and are now trying to cargo test -p query-engine-tests

@aqrln
Copy link
Member

aqrln commented Aug 28, 2025

@LinusU try make dev-pg-qc-query instead of make dev-postgres13 if you want to run tests with QC (assuming that's what you want to do based on the PR title). Otherwise, your sequence of steps is correct if you want to run tests with query engine.

Copy link

codspeed-hq bot commented Aug 28, 2025

CodSpeed Performance Report

Merging #5606 will not alter performance

Comparing LinusU:lu-now (47de924) with main (85179d7)

Summary

✅ 11 untouched benchmarks

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.

3 participants