Skip to content
This repository was archived by the owner on May 8, 2026. It is now read-only.

Commit d871619

Browse files
committed
Delete insert()
1 parent f1bba01 commit d871619

10 files changed

Lines changed: 2 additions & 535 deletions

File tree

google-cloud-firestore/src/main/java/com/google/cloud/firestore/Pipeline.java

Lines changed: 2 additions & 90 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@
4545
import com.google.cloud.firestore.pipeline.stages.Distinct;
4646
import com.google.cloud.firestore.pipeline.stages.FindNearest;
4747
import com.google.cloud.firestore.pipeline.stages.FindNearestOptions;
48-
import com.google.cloud.firestore.pipeline.stages.Insert;
4948
import com.google.cloud.firestore.pipeline.stages.Limit;
5049
import com.google.cloud.firestore.pipeline.stages.Offset;
5150
import com.google.cloud.firestore.pipeline.stages.PipelineExecuteOptions;
@@ -1110,95 +1109,8 @@ public Pipeline update(Update update) {
11101109
}
11111110

11121111
/**
1113-
* Performs an insert operation using documents from previous stages.
1114-
*
1115-
* <p>The documents must include a valid {@code __name__} field specifying the document reference
1116-
* to insert. If the document already exists, the operation will fail.
1117-
*
1118-
* <p>Example:
1119-
*
1120-
* <pre>{@code
1121-
* Map<String, Object> book = new HashMap<>();
1122-
* book.put("__name__", firestore.collection("books").document("newBook"));
1123-
* book.put("title", "New Book");
1124-
*
1125-
* firestore.pipeline()
1126-
* .literals(book)
1127-
* .insert()
1128-
* .execute()
1129-
* .get();
1130-
* }</pre>
1131-
*
1132-
* @return A new {@code Pipeline} object with this stage appended to the stage list.
1133-
*/
1134-
@BetaApi
1135-
public Pipeline insert() {
1136-
return append(new Insert());
1137-
}
1138-
1139-
/**
1140-
* Performs an insert operation using documents from previous stages into a specified target
1141-
* collection.
1142-
*
1143-
* <p>If documents have an ID (or expression evaluation for ID), they will use it. Otherwise,
1144-
* auto-generated IDs will be used if applicable (depending on the source).
1145-
*
1146-
* <p>Example:
1147-
*
1148-
* <pre>{@code
1149-
* CollectionReference backupCol = firestore.collection("books_backup");
1150-
*
1151-
* Map<String, Object> book = new HashMap<>();
1152-
* book.put("title", "New Book");
1153-
*
1154-
* firestore.pipeline()
1155-
* .literals(book)
1156-
* .insert(backupCol)
1157-
* .execute()
1158-
* .get();
1159-
* }</pre>
1160-
*
1161-
* @param target The collection to insert to.
1162-
* @return A new {@code Pipeline} object with this stage appended to the stage list.
1163-
*/
1164-
@BetaApi
1165-
public Pipeline insert(CollectionReference target) {
1166-
return append(new Insert().withCollection(target));
1167-
}
1168-
1169-
/**
1170-
* Performs an insert operation using an {@link Insert} stage.
1171-
*
1172-
* <p>This method allows you to use a pre-configured {@link Insert} stage.
1173-
*
1174-
* <p>Example: Use a pre-configured {@link Insert} stage with a target collection and ID
1175-
* expression, reading from literals.
1176-
*
1177-
* <pre>{@code
1178-
* CollectionReference targetCol = firestore.collection("books_backup");
1179-
* Insert insertStage = new Insert().withCollection(targetCol).withIdExpression(field("custom_id"));
1180-
*
1181-
* Map<String, Object> book = new HashMap<>();
1182-
* book.put("custom_id", "book1");
1183-
* book.put("title", "Book 1");
1184-
*
1185-
* firestore.pipeline()
1186-
* .literals(book)
1187-
* .insert(insertStage)
1188-
* .execute()
1189-
* .get();
1190-
* }</pre>
1191-
*
1192-
* @param insertStage The {@code Insert} stage to append.
1193-
* @return A new {@code Pipeline} object with this stage appended to the stage list.
1194-
*/
1195-
@BetaApi
1196-
public Pipeline insert(Insert insertStage) {
1197-
return append(insertStage);
1198-
}
1199-
1200-
/**
1201-
* Adds a generic stage to the pipeline.
1112+
* Performs an insert operation using documents from previous stages. Adds a generic stage to the
1113+
* pipeline.
12021114
*
12031115
* <p>This method provides a flexible way to extend the pipeline's functionality by adding custom
12041116
* stages. Each generic stage is defined by a unique `name` and a set of `params` that control its

google-cloud-firestore/src/main/java/com/google/cloud/firestore/pipeline/stages/ConflictResolution.java

Lines changed: 0 additions & 35 deletions
This file was deleted.

google-cloud-firestore/src/main/java/com/google/cloud/firestore/pipeline/stages/DeleteReturn.java

Lines changed: 0 additions & 36 deletions
This file was deleted.

google-cloud-firestore/src/main/java/com/google/cloud/firestore/pipeline/stages/Insert.java

Lines changed: 0 additions & 55 deletions
This file was deleted.

google-cloud-firestore/src/main/java/com/google/cloud/firestore/pipeline/stages/InsertReturn.java

Lines changed: 0 additions & 36 deletions
This file was deleted.

google-cloud-firestore/src/main/java/com/google/cloud/firestore/pipeline/stages/UpdateReturn.java

Lines changed: 0 additions & 36 deletions
This file was deleted.

google-cloud-firestore/src/main/java/com/google/cloud/firestore/pipeline/stages/Upsert.java

Lines changed: 0 additions & 82 deletions
This file was deleted.

0 commit comments

Comments
 (0)