SquiDBSQLite 封装层
SquiDB 是 Android 平台下 SQLite 数据库的封装层。简化了 SQlite 数据库的操作,合并了类型安全对象和面向对象 SQL 语句处理。
示例代码:
long ageCutoff = System.currentTimeMillis() - (DateUtil.YEAR_IN_MILLIS * 18); Query peopleWhoCanVote = Query.select().where(Person.BIRTHDAY.lt(ageCutoff)); // This becomes select * from people where people.birthday < ? // where ? is the age cutoff arg SquidCursor<Person> voters = dao.query(Person.class, peopleWhoCanVote);
评论