Repository navigation
feat(firestore): add DML stages, literals source, and atomic execution option to iOS SDK pipelines - #16500
feat(firestore): add DML stages, literals source, and atomic execution option to iOS SDK pipelines#16500wu-hui wants to merge 1 commit into
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. |
7d36a1b to
54f611c
Compare
|
Quoting review comment from @ncooke3 on prototype PR #15801 (#15801 (comment)) for tracking on this PR:
Context & Implementation Details in this PR (#16500):
|
73c1651 to
b72add6
Compare
| /// Whether the pipeline should execute atomically inside a single transaction. | ||
| public var atomic: Bool |
There was a problem hiding this comment.
What's a use case where one wouldn't want atomicity?
There was a problem hiding this comment.
Boolean properties in Swift should read as an assertion. Like isAtomic, isTransactional, executesAtomically, etc.
| /// Sets whether atomic execution is enabled and returns a modified options instance. | ||
| public func withAtomic(_ atomic: Bool) -> ExecuteOptions { | ||
| var copy = self | ||
| copy.atomic = atomic | ||
| return copy | ||
| } |
There was a problem hiding this comment.
I'm not sure the builder pattern should extend to this options struct. It should be only via a devx like this:ExecuteOptions(isAtomic: true)
d88467d to
32811b9
Compare
| // Check if isolated subcollection execution is being attempted. | ||
| guard db != nil else { | ||
| guard let db = db else { |
There was a problem hiding this comment.
nit: there's a shorthand for this
| guard let db = db else { | |
| guard let db else { |
50b58dd to
6bf667f
Compare
…n option to iOS SDK pipelines BUG=b/545234002 TAG=agy
6bf667f to
09984ad
Compare
|
Superseded by #16859 (moved branch from fork to |
Summary
Adds complete DML stages (
DeleteStage,UpdateStage,InsertStage,UpsertStage), Literals source (LiteralsSourceStage), and atomic execution option (Pipeline.ExecuteOptions) 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_transaction+auto_commit_transaction) inremote_objc_bridge.cc.Firestore/Source/API/):FIR*StageBridgeclasses inFIRPipelineBridge.hand implemented inFIRPipelineBridge.mm.FIRPipelineBridgeinitializer to pass atomic execution flag down to C++ Core.Firestore/Swift/Source/):Stageclass definitions inStages.swift.literals(...)entry point methods toPipelineSource.swift.delete(),update(...),insert(...),upsert(...), andPipeline.ExecuteOptionstoPipeline.swift.Firestore/Swift/Tests/Integration/):PipelineDmlTests.swiftmatching Web, Node, and Android test coverage.Buganizer Ticket
Fixes http://b/545234002 (under umbrella http://b/500350942)