MCPcopy Create free account
hub / github.com/MariaDB/server / FindColl

Method FindColl

storage/connect/Mongo3Interface.java:168–191  ·  view source on GitHub ↗
(String query, String fields)

Source from the content-addressed store, hash-verified

166 } // end of GetCollSize
167
168 public boolean FindColl(String query, String fields) {
169 if (DEBUG)
170 System.out.println("FindColl: query=" + query + " fields=" + fields);
171
172 try {
173 if (query != null) {
174 Bson dbq = Document.parse(query);
175 finditer = coll.find(dbq);
176 } else
177 finditer = coll.find();
178
179 if (fields != null) {
180 Bson dbf = BsonDocument.parse(fields);
181 finditer = finditer.projection(dbf);
182 } // endif fields
183
184 cursor = finditer.iterator();
185 } catch (Exception e) {
186 SetErrmsg(e);
187 return true;
188 } // end try/catch
189
190 return false;
191 } // end of FindColl
192
193 @SuppressWarnings("unchecked")
194 public boolean AggregateColl(String pipeline) {

Callers

nothing calls this directly

Calls 4

SetErrmsgMethod · 0.95
parseMethod · 0.45
findMethod · 0.45
iteratorMethod · 0.45

Tested by

no test coverage detected