Skip to content

feat: support appendMissingElements (arrayUnion) in YustFieldTransform - #417

Open
CLNMR wants to merge 1 commit into
masterfrom
field-transform-array-union
Open

feat: support appendMissingElements (arrayUnion) in YustFieldTransform#417
CLNMR wants to merge 1 commit into
masterfrom
field-transform-array-union

Conversation

@CLNMR

@CLNMR CLNMR commented May 19, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Adds appendMissingElements to YustFieldTransform, wired through both the Dart (googleapis/firestoreArrayValue) and Flutter (cloud_firestoreFieldValue.arrayUnion) variants so callers can union values into an array field.
  • Updates YustDatabaseServiceMocked.updateDocByTransform to honor the full transform set (appendMissingElements, removeFromArray, setToServerTimestamp, delete) instead of treating every transform as an increment.
  • Bumps version to 3.34.0.

Test plan

  • On Flutter: a YustFieldTransform(fieldPath: ..., appendMissingElements: [...]) round-trips through cloud_firestore and produces the correct FieldValue.arrayUnion(...) op.
  • On Dart: the same transform serializes to a FieldTransform with appendMissingElements set on the REST request.
  • In mocked tests: arrays are correctly unioned (duplicates skipped via DeepCollectionEquality), and removeFromArray / setToServerTimestamp / delete no longer fall through to the increment path.

🤖 Generated with Claude Code

Adds `appendMissingElements` to `YustFieldTransform` so callers can ask
Firestore to union values into an array field. Wired through both the
Dart (`googleapis/firestore`) and Flutter (`cloud_firestore`) variants.

Also makes `YustDatabaseServiceMocked.updateDocByTransform` honor the
full transform set (`appendMissingElements`, `removeFromArray`,
`setToServerTimestamp`, `delete`) instead of treating every transform
as an `increment`.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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