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

Method FindColl

storage/connect/Mongo2Interface.java:152–175  ·  view source on GitHub ↗
(String query, String fields)

Source from the content-addressed store, hash-verified

150 } // end of GetCollSize
151
152 public boolean FindColl(String query, String fields) {
153 if (DEBUG)
154 System.out.println("FindColl: query=" + query + " fields=" + fields);
155
156 try {
157 if (query != null || fields != null) {
158 dbq = (BasicDBObject) JSON.parse((query != null) ? query : "{}");
159
160 if (fields != null) {
161 dbf = (BasicDBObject) JSON.parse(fields);
162 cursor = coll.find(dbq, dbf);
163 } else
164 cursor = coll.find(dbq);
165
166 } else
167 cursor = coll.find();
168
169 } catch (Exception e) {
170 SetErrmsg(e);
171 return true;
172 } // end try/catch
173
174 return false;
175 } // end of FindColl
176
177 @SuppressWarnings("unchecked")
178 public boolean AggregateColl(String pipeline) {

Callers 4

mainMethod · 0.45
mainMethod · 0.45
mainMethod · 0.45
mainMethod · 0.45

Calls 3

SetErrmsgMethod · 0.95
parseMethod · 0.45
findMethod · 0.45

Tested by 2

mainMethod · 0.36
mainMethod · 0.36