yesodweb / yesodweb/persistent
Unnecessary dependencies for a custom primary key
Nobody has claimed this yet.
- Dominant language
- Haskell
- Stars
- 486
- Forks
- 306
- PR merge metrics
- No merged PRs in 30d
Description
I want to work with a database outside of a web server.
When I define a custom Id or Primary, Persistent requires me to define instances PathPiece, From/ToHttpApiData, From/ToJSON, but I don't need them, it's extra code and extra dependencies for the project.
Could we disconnect Persistent from the web server usage?
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 tracing how Persistent requires PathPiece, From/ToHttpApiData, and From/ToJSON for custom Id or Primary definitions. Compare those requirements with database-only use outside a web server; done means custom primary keys no longer require unnecessary web-related instances or dependencies.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- haskell
- Domain
- databases
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100