Options defining Pipeline execution.
Signature:
export declare interface PipelineExecuteOptions
Properties
| Property | Type | Description |
|---|---|---|
| atomic | boolean | If true, the pipeline is executed in a new read-write transaction that is committed automatically when the pipeline completes, so all writes made by DML stages (insert, upsert, update, delete) succeed or fail together.If false or omitted, DML writes are applied per document without a transaction, and the pipeline may partially succeed. Some DML pipelines (e.g. an upsert from a literals() source) can only be executed atomically, and are otherwise rejected with "The non-transactional DML operation was rejected because it was impossible to guarantee document-level atomicity." |
| indexMode | 'recommended' | Specify the index mode. |
| pipeline | Pipeline | Pipeline to be evaluated. |
| rawOptions | { [name: string]: unknown; } | An escape hatch to set options not known at SDK build time. These values will be passed directly to the Firestore backend and not used by the SDK.The option name will be used as provided. And must match the name format used by the backend (hint: use a snake_case_name).Custom option values can be any type supported by Firestore (for example: string, boolean, number, map, …). Value types not known to the SDK will be rejected.Values specified in rawOptions will take precedence over any options with the same name set by the SDK. |
PipelineExecuteOptions.atomic
If true, the pipeline is executed in a new read-write transaction that is committed automatically when the pipeline completes, so all writes made by DML stages (insert, upsert, update, delete) succeed or fail together.
If false or omitted, DML writes are applied per document without a transaction, and the pipeline may partially succeed. Some DML pipelines (e.g. an upsert from a literals() source) can only be executed atomically, and are otherwise rejected with "The non-transactional DML operation was rejected because it was impossible to guarantee document-level atomicity."
Signature:
atomic?: boolean;
PipelineExecuteOptions.indexMode
Specify the index mode.
Signature:
indexMode?: 'recommended';
PipelineExecuteOptions.pipeline
Pipeline to be evaluated.
Signature:
pipeline: Pipeline;
PipelineExecuteOptions.rawOptions
An escape hatch to set options not known at SDK build time. These values will be passed directly to the Firestore backend and not used by the SDK.
The option name will be used as provided. And must match the name format used by the backend (hint: use a snake_case_name).
Custom option values can be any type supported by Firestore (for example: string, boolean, number, map, …). Value types not known to the SDK will be rejected.
Values specified in rawOptions will take precedence over any options with the same name set by the SDK.
Signature:
rawOptions?: {
[name: string]: unknown;
};
Example
Override the example_option:
execute({
pipeline: myPipeline,
rawOptions: {
// Override `example_option`. This will not
// merge with the existing `example_option` object.
"example_option": {
foo: "bar"
}
}
}
rawOptions supports dot notation, if you want to override a nested option.
execute({
pipeline: myPipeline,
rawOptions: {
// Override `example_option.foo` and do not override
// any other properties of `example_option`.
"example_option.foo": "bar"
}
}