MCPcopy Index your code
hub / github.com/Sopage/android-orm / query

Method query

library/src/main/java/com/sanders/db/DBProxy.java:428–436  ·  view source on GitHub ↗

根据条件查询一条记录到实体 @param clazz @param where @param args @param @return

(Class<T> clazz, String where, String... args)

Source from the content-addressed store, hash-verified

426 * @return
427 */
428 public <T extends IDColumn> T query(Class<T> clazz, String where, String... args) {
429 SQLiteDatabase database = getDatabase();
430 ClassInfo<T> classInfo = getClassInfo(clazz);
431 Cursor cursor = database.query(classInfo.getTableName(), null, where, args, null, null, null);
432 T t = classInfo.getInstanceObject(cursor);
433 close(cursor);
434 close(database);
435 return t;
436 }
437
438 /**
439 * 根据主键查询实体

Callers 1

queryListMethod · 0.80

Calls 6

getDatabaseMethod · 0.95
getClassInfoMethod · 0.95
closeMethod · 0.95
putMapKeyValueMethod · 0.95
getTableNameMethod · 0.80
getInstanceObjectMethod · 0.80

Tested by

no test coverage detected