yesodweb / yesodweb/persistent

SQLite should use native upsert

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

Nobody has claimed this yet.

Sqlite
Dominant language
Haskell
Stars
486
Forks
306
PR merge metrics
No merged PRs in 30d

Description

Currently the SQLite backend doesn't use SQLite's native upsert capabilities:

    return $ SqlBackend
        { connPrepare = prepare' conn
        , connStmtMap = smap
        , connInsertSql = insertSql'
        , connUpsertSql = Nothing

However, SQLite now supports native upsert. We should update the SQLite backend to use this new capability.

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 locating the SQLite backend implementation containing the SqlBackend record and its connUpsertSql field, then compare it with the existing insert and upsert paths. Confirm SQLite's native UPSERT syntax and exercise the existing SQLite upsert coverage; done means the backend uses native upsert behavior without breaking current operations.

Written by the indexing model from the issue text.

Assessment

Tech stack
haskell, sqlite
Domain
databases
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.