File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed
astra-db-client/src/test/java/com/dtsx/astra/sdk/documentation Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change 11package com .dtsx .astra .sdk .documentation ;
2+
23import com .dtsx .astra .sdk .AstraDB ;
34import io .stargate .sdk .json .domain .CollectionDefinition ;
45
56public class FindAllCollections {
67 public static void main (String [] args ) {
7-
8- // Given an active db
98 AstraDB db = new AstraDB ("<token>" , "<api_endpoint>" );
109
11- // Iterate over all collections
10+ // Iterate over all collections and print each vector definition
1211 db .findAllCollections ().forEach (col -> {
1312 System .out .print ("\n name=" + col .getName ());
1413 if (col .getOptions () != null && col .getOptions ().getVector () != null ) {
1514 CollectionDefinition .Options .Vector vector = col .getOptions ().getVector ();
16- System .out .print (",dim=" + vector .getDimension ());
17- System .out .print (",metric=" + vector .getMetric ());
15+ System .out .print (", dim=" + vector .getDimension ());
16+ System .out .print (", metric=" + vector .getMetric ());
1817 }
1918 });
2019 }
You can’t perform that action at this time.
0 commit comments