Repository navigation
feat(firestore): add DML stages, literals source, and atomic execution option to iOS SDK pipelines - #16859
Conversation
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize the Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counterproductive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here. |
…n option to iOS SDK pipelines BUG=b/545234002 TAG=agy
09984ad to
fa508bf
Compare
The upsert docs said an existing document has its fields updated. The backend replaces the whole document, so fields missing from the input are removed. The in-place overloads write to the path in each input document's `__name__` field and fail for inputs without one; the target-collection overload reuses the input document's ID or generates one. The in-place array example now upserts an existing document.
ncooke3
left a comment
There was a problem hiding this comment.
LGTM on in-progress spm-binary update and resulting green CI.
Summary
Adds complete DML stages (
DeleteStage,UpdateStage,InsertStage,UpsertStage), Literals source (LiteralsSourceStage), and atomic execution option (ExecuteOptions(isAtomic:)) to the iOS SDK (firebase-ios-sdk) Firestore Pipelines subsystem across the 3-layer architecture (C++ Core, Objective-C++ Bridge, Swift Public API).Key Changes
Firestore/core/src/api/&remote/):DeleteStage,UpdateStage,InsertStage,UpsertStage, andLiteralsSourceclasses instages.h/stages.cc.atomicexecution flag support toPipelineinpipeline.h/pipeline.ccand configured transaction options (new_transactionwithConcurrencyMode::OPTIMISTIC+auto_commit_transaction = true) inremote_objc_bridge.cc.google/firestore/v1/common.protoandfirestore.proto.Firestore/Source/API/):__DeleteStageBridge,__UpdateStageBridge,__InsertStageBridge,__UpsertStageBridge, and__LiteralsSourceStageBridgeclasses inFIRPipelineBridge.hand implemented inFIRPipelineBridge.mm.__FIRPipelineBridgeinitializer to pass theatomicexecution flag down to C++ Core.Firestore/Swift/Source/):Stageclass definitions inStages.swift.literals(...)entry point methods toPipelineSource.swift.delete(),update(...),insert(...),upsert(...), andPipeline.ExecuteOptions(isAtomic:)toPipeline.swift.EncodesExecutePipelineRequestWithAtomic,EncodesExecutePipelineRequestSetAtomic) inFirestore/core/test/unit/remote/serializer_test.cc.Firestore/Swift/Tests/Integration/PipelineDmlTests.swiftmatching Web, Node, and Android test coverage.Testing
ctest --output-on-failureinbuild/):15/15test suites passed (100%), includingfirestore_remote_test(236/236passed)../scripts/style.sh test-only origin/main,./scripts/check_lint.py,./scripts/check_whitespace.sh,./scripts/check_copyright.sh,./scripts/check_test_inclusion.py, andswift ./scripts/check_imports.swiftpassed with 0 errors.Breaking Changes
None (additive public API on
PipelineSourceandPipeline).Buganizer Ticket
Fixes http://b/545234002 (under umbrella http://b/500350942)