yesodweb / yesodweb/persistent

Unnecessary dependencies for a custom primary key

Open
#1,622 1 comment 0 reactions 0 assignees View on GitHub

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

Open the contributing guide

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 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.