share / share/sharedb

how to reload/refresh ShareDB document?

Open
#650 7 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

as topic, a document was created as follow code :

const shareDBDoc = this.shareDBConnection.get('documents', key ); 
...
shareDBDoc.create(initialDocument, json1Presence.type.uri);

since the document does not reload file from disk realtime, have to reload/refresh document manually,

I use ' shareDBDoc.destory() ', it does not work, report error bellow:

ShareDBError: Document already exists

my questions, how to reload or refresh the shareDBDoc ? can not find relative guide from the online document yet..

thank for help in advance

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 with the ShareDB document API entry point and the calls shown in the issue: connection.get(), create(), and destroy(). Reproduce the “Document already exists” error and determine the documented reload or refresh lifecycle. Done means the supported way to refresh a document is clear and the relevant API guidance or behavior is updated.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
backend, databases
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 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.