Skip to content

Feature request: insert_or_update ("upsert") #2612

@jdetter

Description

@jdetter

Something like this:

// Pseudocode
func upsert(ctx, primary_key_value, value):
  if ctx.primary_key_column.try_find(primary_key_value):
    // Row with a matching primary key column exists
    ctx.primary_key_column.delete(primary_key_value)
  ctx.primary_key_column.insert(primary_key_value, value)
  

In order to upsert on a column it needs to have a unique constraint on it.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions