luckyframework / luckyframework/avram

Rename current #upsert(!) methods

Open
#790 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Crystal
Stars
183
Forks
67
PR merge metrics
No merged PRs in 30d

Description

As presented in https://github.com/luckyframework/avram/pull/789 , the upserts in current avram are more of "find_or_create", instead of utilizing `upsert` from postgres: https://www.postgresql.org/docs/9.5/sql-insert.html (INSERT INTO ... ON CONFLICT UPDATE)

This can be confusing to newcomers expecting upsert to be a single UPSERT query.

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 reading pull request 789 and locating the current `upsert` methods in Avram. Confirm how their behavior differs from PostgreSQL's `INSERT ... ON CONFLICT UPDATE`, then determine the names that accurately describe the existing find-or-create behavior and update the affected references.

Written by the indexing model from the issue text.

Assessment

Tech stack
crystal, postgresql
Domain
database
Issue type
Refactor
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.