作者:yyjj7212 | 来源:互联网 | 2023-10-10 17:40
本文整理了Java中org.greenrobot.greendao.AbstractDao.queryRaw()
方法的一些代码示例,展示了AbstractDao.queryRaw()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。AbstractDao.queryRaw()
方法的具体详情如下:
包路径:org.greenrobot.greendao.AbstractDao
类名称:AbstractDao
方法名:queryRaw
AbstractDao.queryRaw介绍
[英]A raw-style query where you can pass any WHERE clause and arguments.
[中]原始样式的查询,您可以在其中传递任何where子句和参数。
代码示例
代码示例来源:origin: greenrobot/greenDAO
/** Convenient call for {@link AbstractDao#queryRaw(String, String...)}. */
public List queryRaw(Class entityClass, String where, String... selectionArgs) {
@SuppressWarnings("unchecked")
AbstractDao dao = (AbstractDao) getDao(entityClass);
return dao.queryRaw(where, selectionArgs);
}
代码示例来源:origin: greenrobot/greenDAO
public void testQuery() {
dao.insert(createEntityWithRandomPk());
K pkForQuery = nextPk();
dao.insert(createEntity(pkForQuery));
dao.insert(createEntityWithRandomPk());
String where = "WHERE " + dao.getPkColumns()[0] + "=?";
List list = dao.queryRaw(where, pkForQuery.toString());
assertEquals(1, list.size());
assertEquals(pkForQuery, daoAccess.getKey(list.get(0)));
}
代码示例来源:origin: wutq/AndroidModuleDemo
public List query(String where, String... params) {
return mDao.queryRaw(where, params);
}
代码示例来源:origin: org.greenrobot/greendao
/** Convenient call for {@link AbstractDao#queryRaw(String, String...)}. */
public List queryRaw(Class entityClass, String where, String... selectionArgs) {
@SuppressWarnings("unchecked")
AbstractDao dao = (AbstractDao) getDao(entityClass);
return dao.queryRaw(where, selectionArgs);
}
代码示例来源:origin: org.greenrobot/greendao
public void testQuery() {
dao.insert(createEntityWithRandomPk());
K pkForQuery = nextPk();
dao.insert(createEntity(pkForQuery));
dao.insert(createEntityWithRandomPk());
String where = "WHERE " + dao.getPkColumns()[0] + "=?";
List list = dao.queryRaw(where, pkForQuery.toString());
assertEquals(1, list.size());
assertEquals(pkForQuery, daoAccess.getKey(list.get(0)));
}