File tree Expand file tree Collapse file tree 1 file changed +13
-13
lines changed
astra-db-client/src/test/java/com/dtsx/astra/sdk/documentation Expand file tree Collapse file tree 1 file changed +13
-13
lines changed Original file line number Diff line number Diff line change 33import io .stargate .sdk .json .domain .CollectionDefinition ;
44
55public class ListCollections {
6- public static void main (String [] args ) {
7- // Given an active db
8- AstraDB db = new AstraDB ("<token>" , "<api_endpoint>" );
9- // Iterate over all collections
10- db .findAllCollections ().forEach (col -> {
11- System .out .println ("name=" + col .getName ());
12- if (col .getOptions () != null && col .getOptions ().getVector () != null ) {
13- CollectionDefinition .Options .Vector vector = col .getOptions ().getVector ();
14- System .out .println ("dim=" + vector .getDimension ());
15- System .out .println ("metric=" + vector .getMetric ());
16- }
17- });
18- }
6+ public static void main (String [] args ) {
7+ // Given an active db
8+ AstraDB db = new AstraDB ("<token>" , "<api_endpoint>" );
9+ // Iterate over all collections
10+ db .findAllCollections ().forEach (col -> {
11+ System .out .println ("name=" + col .getName ());
12+ if (col .getOptions () != null && col .getOptions ().getVector () != null ) {
13+ CollectionDefinition .Options .Vector vector = col .getOptions ().getVector ();
14+ System .out .println ("dim=" + vector .getDimension ());
15+ System .out .println ("metric=" + vector .getMetric ());
16+ }
17+ });
18+ }
1919}
You can’t perform that action at this time.
0 commit comments