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