share / share/sharedb

How to access mtime and ctime?

Open
#164 16 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
JavaScript
Stars
6.5k
Forks
456
Avg merge
1d 5h
Merged PRs (30d)
5

Description

ShareDB adds the creation and last modified date to documents under the m (meta) field, as m.ctime and m.mtime (in SubmitRequest.prototype._addSnapshotMeta). However, these fields do not appear on doc objects after fetching or subscribing. Does anyone know of a way to access these values from within a ShareDB client?

Contributor guide

No contributing guide indexed for this repository

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

Start at lib/submit-request.js, particularly SubmitRequest.prototype._addSnapshotMeta, then trace how doc objects are built after fetching or subscribing. Verify whether m.ctime and m.mtime are exposed to clients and identify the supported access path. Done means documenting that path or clearly recording the missing behavior with a focused test.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
api, backend
Issue type
Documentation
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.