Skip to content

Commit 2603348

Browse files
authored
Merge pull request #101 from djsauble/patch-15
Update FindCollection.java
2 parents fa04069 + 714357a commit 2603348

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed
Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,17 @@
11
package com.dtsx.astra.sdk.documentation;
2+
23
import com.dtsx.astra.sdk.AstraDB;
34
import io.stargate.sdk.json.domain.CollectionDefinition;
4-
55
import java.util.Optional;
66

77
public class FindCollection {
88
public static void main(String[] args) {
9-
10-
// Given an active db
119
AstraDB db = new AstraDB("<token>", "<api_endpoint>");
1210

1311
// Find a collection
1412
Optional<CollectionDefinition> collection = db.findCollection("collection_vector1");
1513

16-
// Another test with a collection that does not exist
14+
// Check if a collection exists
1715
boolean collectionExists = db.isCollectionExists("collection_vector2");
1816
}
1917
}

0 commit comments

Comments
 (0)