Skip to content

Support upserts through Quick entity queries - #334

Open
elpete wants to merge 1 commit into
nextfrom
feat/63-upsert
Open

Support upserts through Quick entity queries#334
elpete wants to merge 1 commit into
nextfrom
feat/63-upsert

Conversation

@elpete

@elpete elpete commented Aug 22, 2026

Copy link
Copy Markdown
Collaborator

Closes #63

Issue review

Recommendation: 9/10 — implement. Upsert is a useful bulk persistence primitive and qb now provides the database-specific SQL safely. Quick should expose it without duplicating that compilation logic. The main tradeoffs are that conflict behavior remains database-specific and this is a query operation rather than an entity lifecycle operation, so it does not hydrate entities or fire per-entity persistence events.

Implementation

  • verifies upsert through the public entity query API
  • covers both updating an existing record and inserting a new record in one call
  • preserves Quick attribute-to-column mapping (firstName to first_name)
  • aligns the QuickQB wrapper with qb 14’s matchNulls and constrained deleteUnmatched API

Reproduction note

The original missing-method behavior could not be reproduced with qb@14.0.0-beta.3: Quick already forwards upsert successfully. The added regression proves the complete database behavior and the wrapper declaration was updated to match the current qb contract.

Validation

  • focused QuerySpec: 5 passed, 0 failed, 0 errors
  • full Lucee 6 suite: 496 passed, 0 failed, 0 errors, 3 skipped
  • box run-script format
  • git diff --check

Uses qb@14.0.0-beta.3.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant