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

qe: sync @default(now()) and @updatedAt within a request #3200

Merged
merged 1 commit into from Sep 21, 2022

Commits on Sep 20, 2022

  1. qe: sync @default(now()) and @updatedAt within a request

    There are two points of difficulty here:
    
    - Using the same PrismaValue::DateTime as the value of `now()` and
      `@updatedAt` for the duration of a request. We achieve that through a
      task local.
      Alternatives: passing the context through explicitly. I tried, it's a
      massive refactoring.
    - The loss of precision due to the `From<PrismaValue>` impl for
      `QueryValue`. This is fixed by adding a `QueryValue::DateTime` variant
      that preserves the original precision.
    tomhoule committed Sep 20, 2022
    Copy the full SHA
    5918f1e View commit details
    Browse the repository at this point in the history