-
Notifications
You must be signed in to change notification settings - Fork 454
Getting metadata for operations #106
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
Comments
Is this being addressed? |
Can you get them out via a straight up Mongo query? |
@curran It's in the database, so sure, I suppose you could. However, when I've needed it, I've just changed L239 in backend.db.getOps(collection, id, from, to, null, function(err, ops) { to backend.db.getOps(collection, id, from, to, { metadata: 1 }, function(err, ops) { It gets the job done, but it's quite nasty to modify the library, and something you have to remember to do every time you update sharedb, but since the project is dead now, well... |
@kbadk Oh nice! Thanks for sharing that snippet. It would be great to add a way of passing the options in through ShareDB. Maybe one more argument can be added to
Would you be willing to put together a PR that does something like this? @nateps Any thoughts on an enhancement like this? Would a PR be welcome? Introducing a change like this would help improve the perception that ShareDB is a dead project, which seems to be quite widespread. |
This would be solved by: #215 |
Uh oh!
There was an error while loading. Please reload this page.
I recently requested metadata to be included in sharedb-mongo and it was made possible shortly after by adding an
options
parameter.However, I'm not quite sure how to actually get the metadata out. The
options
parameter was added toShareDbMongo.prototype.getOps
:But unfortuntaely, the options don't seem to be passed over from ShareDB itself.
Backend.prototype.getOps
does not take anyoptions
parameter and just passes throughnull
as options to sharedb-mongo (throughbackend.db.getOps
):How am I supposed to pass options (to get metadata) to sharedb-mongo without modifying the ShareDB source code?
The text was updated successfully, but these errors were encountered: