Skip to content

Update upsert method to support return_keys and safe execution for Table and Declarative objects #3

@faizanazim11

Description

@faizanazim11

Overview

Update the upsert method in sql_utils to add support for the return_keys parameter. Ensure that all logic involving return_keys uses a safe execution style, as present in some existing functions, to correctly handle both Table objects and Declarative objects.

Tasks

  • Add return_keys support to the upsert method.
  • Refactor all code paths where return_keys is used to adopt the safe execution approach found in some functions.
  • Ensure compatibility for both Table and Declarative objects when handling return_keys.
  • Add or update relevant tests to cover new and refactored logic.
  • Update package version from 1.1.1 to 1.2.0.

Acceptance Criteria

  • upsert method correctly supports and returns return_keys for both Table and Declarative objects.
  • No breaking changes in existing logic; refactored code uses the safe handling pattern.
  • All affected code paths are tested for both object types.
  • The implemetation to match in both sync and async versions.

If relevant, please attach code snippets or references to existing safe execution style implementations for clarity.

Metadata

Metadata

Labels

bugSomething isn't working

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions