yesodweb / yesodweb/persistent
non-Entity/record equivalents for a variety of functions
Nobody has claimed this yet.
- Dominant language
- Haskell
- Stars
- 486
- Forks
- 306
- PR merge metrics
- No merged PRs in 30d
Description
We try to avoid using Entity/record directly, as it is rare that we actually need all the fields of a row, so it hurts performance significantly to send them over every time.
There are a few places that this has been difficult to do, for example upsert. This function would be very useful, but we currently avoid it due to the overhead.
For this reason I would greatly appreciate non-Entity/record equivalents of various functions that return Key or even ().
For read operations I can understand Entity/record being the default, in which case perhaps a Key suffix or similar could work for getting just the Key.
For write operations I personally think having Key be the default makes sense, with an _ suffix for (), and an Entity suffix for Entity. For backwards compatibility reasons I can understand taking the Key suffix approach even if it will be a little inconsistent with existing write operations like insert.
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 reviewing the existing write operations, including insert, and the upsert function discussed in the issue. Define the scope and naming for non-Entity/record operations that return Key or (), with consistent coverage across the requested functions and compatibility with existing APIs.
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