share / share/sharedb

Feature Request: Support for Custom Type Projections in ShareDB

Open
#622 3 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

Hello,

I'm currently working with a custom type in ShareDB and am keen on implementing projections for it. Upon reviewing the source code, I noticed that the functions within lib/projections.js appear to be tailored specifically for the json0 type.

To enhance the versatility of projections in ShareDB, would it be possible to add an option in the ShareDB constructor that permits users to provide custom functions tailored to their specific type operations?

Additionally, I'd like to clarify if the functions present in lib/projections.js are the sole methods that need adaptation for the successful integration of projections with custom types?

Thank you for considering this request.

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 by reading lib/projections.js and the ShareDB constructor to understand how projections are currently tied to the json0 type. Trace the custom type operations mentioned in the issue and identify all projection behavior that would need configurable functions. Done means custom types can use projections through the proposed constructor option, with the required integration points clarified.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
backend
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.