MCPcopy Index your code
hub / github.com/androrm/androrm / getCount

Method getCount

src/src/com/orm/androrm/QuerySet.java:202–218  ·  view source on GitHub ↗
(SelectStatement query)

Source from the content-addressed store, hash-verified

200 }
201
202 private int getCount(SelectStatement query) {
203 SelectStatement countQuery = new SelectStatement();
204 countQuery.from(query)
205 .count();
206
207 Cursor c = getCursor(countQuery);
208
209 int count = 0;
210
211 if(c.moveToFirst()) {
212 count = c.getInt(c.getColumnIndexOrThrow(Model.COUNT));
213 }
214
215 closeConnection(c);
216
217 return count;
218 }
219
220 /**
221 * Checks if the result of this query contains the given

Callers 3

countMethod · 0.95
containsMethod · 0.95
containsAllMethod · 0.95

Calls 4

fromMethod · 0.95
getCursorMethod · 0.95
closeConnectionMethod · 0.95
countMethod · 0.45

Tested by

no test coverage detected