yesodweb / yesodweb/persistent
Is there shareded DB support?
Nobody has claimed this yet.
- Dominant language
- Haskell
- Stars
- 486
- Forks
- 306
- PR merge metrics
- No merged PRs in 30d
Description
Hi,
It seems Persistent doesn't support sharded tables.
The situation when a single DB has lots of tables with same structure.
All these tables share a data type representing the tables,
which instantiates PersistEntity class.
PersistEntity has entitfyDef function. It already returns meta data including table name, but
there is not way to make it dynamic. entityDef is pure function so it is not possible to benefit from ReaderT.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading the PersistEntity and entityDef interfaces described in the issue, then examine how the current pure entityDef API handles table metadata. Determine the requirements for dynamic table names and ReaderT-based sharding, and define what API behavior and tests would demonstrate shared-table support.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- haskell
- Domain
- databases
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100