问题描述
用 RealmDB 对象如何写多键查询? 架构部分:
StudentSchemaNames.student_data = { classID: int,student: 学生[],noOfPresence: int,noOfabsence: int,noOfLeft: int };
StudentScehmaNames.students = {studentid:int,studentfirstName: string:,studentlastName:string}
studentDetails = [{"classID": "001","students": [Array],"noOfPresence": 30,"noOfabsence": 2,"noOfLeft": 9}];
目前我正在获取有关 studentId= 001 的详细信息;
studentDetails = await RealmDB.get(StudentSchemaNames.student_DATA,studentId="${studentId}" AND 'noOfPresence'
);
这里的学生 ID 属性通过值和 noOfPresence 传递,只有属性名称和要执行的查询中没有值。
但我想写这样的查询; 场景 1:根据学生 ID 取值和 NoOfPresence only 属性获取数据 场景 2:仅使用学生 id 值获取学生属性的数据基础 场景 3:仅以学生 id 值获取基于类属性的数据
帮助我使用 RealmDB 为上述场景编写查询。提前致谢
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)