@@ -41,14 +41,14 @@ int main()
4141 {{" name" , " content" }, {" type" , " string" }},
4242 {{" name" , " value" }, {" type" , " int" }}})}};
4343
44- auto create_result = client.collections ()-> create (collection_name, schema);
44+ auto create_result = client.createCollection (collection_name, schema);
4545 if (create_result.isSuccess ())
4646 {
47- std::cout << " ✓ Collection '" << collection_name << " ' created successfully" << std::endl;
47+ std::cout << " OK Collection '" << collection_name << " ' created successfully" << std::endl;
4848 }
4949 else
5050 {
51- std::cout << " ✗ Failed to create collection: " << create_result.getStatusCode () << std::endl;
51+ std::cout << " ERROR Failed to create collection: " << create_result.getStatusCode () << std::endl;
5252 std::cout << " Error: " << create_result.getBody ().dump (2 ) << std::endl;
5353 return 1 ;
5454 }
@@ -68,14 +68,14 @@ int main()
6868 {" content" , " This is a test document for flush example" },
6969 {" value" , 42 }};
7070
71- auto add_result = client.documents ()-> add (collection_name, doc);
71+ auto add_result = client.addDocument (collection_name, doc);
7272 if (add_result.isSuccess ())
7373 {
74- std::cout << " ✓ Document '" << doc_id << " ' added successfully" << std::endl;
74+ std::cout << " OK Document '" << doc_id << " ' added successfully" << std::endl;
7575 }
7676 else
7777 {
78- std::cout << " ✗ Failed to add document: " << add_result.getStatusCode () << std::endl;
78+ std::cout << " ERROR Failed to add document: " << add_result.getStatusCode () << std::endl;
7979 std::cout << " Error: " << add_result.getBody ().dump (2 ) << std::endl;
8080 }
8181
@@ -84,7 +84,7 @@ int main()
8484 /* Step 3: Check collection count before flush */
8585
8686 std::cout << " Step 3: Checking collection count before flush..." << std::endl;
87- auto collections_before = client.collections ()-> list (0 , 1000 );
87+ auto collections_before = client.listCollections (0 , 1000 );
8888 int count_before = 0 ;
8989 if (collections_before.isSuccess ())
9090 {
@@ -95,13 +95,13 @@ int main()
9595 std::cout << " Collections before flush: " << count_before << std::endl;
9696 if (count_before == 0 )
9797 {
98- std::cout << " ⚠ Warning: No collections found before flush" << std::endl;
98+ std::cout << " Warning: No collections found before flush" << std::endl;
9999 }
100100 }
101101 }
102102 else
103103 {
104- std::cout << " ✗ Failed to list collections: " << collections_before.getStatusCode () << std::endl;
104+ std::cout << " ERROR Failed to list collections: " << collections_before.getStatusCode () << std::endl;
105105 }
106106
107107 std::cout << std::endl;
@@ -118,7 +118,7 @@ int main()
118118 {
119119 collections_deleted = body[" collections_deleted" ];
120120 }
121- std::cout << " ✓ Flush completed successfully" << std::endl;
121+ std::cout << " OK Flush completed successfully" << std::endl;
122122 std::cout << " Collections deleted: " << collections_deleted << std::endl;
123123 std::string message = " N/A" ;
124124 if (body.contains (" message" ) && body[" message" ].is_string ())
@@ -129,7 +129,7 @@ int main()
129129 }
130130 else
131131 {
132- std::cout << " ✗ Flush failed: " << flush_result.getStatusCode () << std::endl;
132+ std::cout << " ERROR Flush failed: " << flush_result.getStatusCode () << std::endl;
133133 std::cout << " Error: " << flush_result.getBody ().dump (2 ) << std::endl;
134134 return 1 ;
135135 }
@@ -139,7 +139,7 @@ int main()
139139 /* Step 5: Re-check collection count after flush */
140140
141141 std::cout << " Step 5: Checking collection count after flush..." << std::endl;
142- auto collections_after = client.collections ()-> list (0 , 1000 );
142+ auto collections_after = client.listCollections (0 , 1000 );
143143 int count_after = -1 ;
144144 if (collections_after.isSuccess ())
145145 {
@@ -151,17 +151,17 @@ int main()
151151
152152 if (count_after == 0 )
153153 {
154- std::cout << " ✓ SUCCESS: All collections have been flushed" << std::endl;
154+ std::cout << " SUCCESS: All collections have been flushed" << std::endl;
155155 }
156156 else
157157 {
158- std::cout << " ⚠ Warning: Expected 0 collections, but found " << count_after << std::endl;
158+ std::cout << " Warning: Expected 0 collections, but found " << count_after << std::endl;
159159 }
160160 }
161161 }
162162 else
163163 {
164- std::cout << " ✗ Failed to list collections: " << collections_after.getStatusCode () << std::endl;
164+ std::cout << " ERROR Failed to list collections: " << collections_after.getStatusCode () << std::endl;
165165 }
166166
167167 std::cout << std::endl;
0 commit comments