Request Details

Like try_insert except it's try_update:

// Pseudocode
bool try_update(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)
  else:
    // The row with the matching primary key didn't exist
    return false
  1. jdetter closed this as completed Apr 14, 2025
  2. jdetter added the feature-request label Apr 14, 2025

Reopen this request?

The request will return to its prior live status.

Mark as Duplicate

Pick the request that Feature request: try_update is a duplicate of. Energy rolls up into that request and GitHub closes the linked issue as a duplicate with a timeline reference to the canonical.

Unmark Duplicate

Restore as an independent request. The linked GitHub issue will be reopened and its duplicate-of relationship cleared. The original timeline entries stay as history; the note below is posted as a follow-up comment.