yesodweb / yesodweb/persistent

syntax for updatedAt or other database performed updates

Open
#281 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Feature Request mongoDB
Dominant language
Haskell
Stars
486
Forks
306
PR merge metrics
No merged PRs in 30d

Description

For most SQL databases one might do this with a trigger, so this might be MongoDB specific.

There is a $currentDate operator to set an updated time.

Person
  name Text
  updatedAt UTCTime
  AutoUpdate updatedAt db="$currentDate { updatedAt: true }"

Here AutoUpdate lists all the fields involved (updateAt) so that the field nane can be validated. It expects those fields listed in the db expression

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Issue #281 proposes an AutoUpdate declaration for updatedAt using MongoDB's $currentDate operator and validation of fields listed in the database expression. No files, tests, or entry points are named; first identify the MongoDB backend and its update syntax, then define and test the proposed behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
haskell, mongodb
Domain
databases
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.