How to fetch two Properties one with value and another with only property name within same object in ReamDB?

217 views Asked by At

with RealmDB object how to write multiple keys query ? Schema Part:

StudentSchemaNames.student_data = { classID: int, students: Students[], noOfPresence: int, noOfabsence: int, noOfLeft: int } ;

StudentScehmaNames.students = {studentid:int, studentfirstName: string:, studentlastName:string}

I am having an object like;

studentDetails = [{"classID": "001", "students": [Array], "noOfPresence": 30, "noOfabsence": 2, "noOfLeft": 9}];

currently I am fetching details basic on studentId= 001 ;

studentDetails = await RealmDB.get(StudentSchemaNames.student_DATA, studentId="${studentId}" AND 'noOfPresence');

here student ID property is passed with value and noOfPresence only property name and no value in query to be executed.

but I wanted to write query like ; Scenario1: Fetch data basis on student ID with value and NoOfPresence only Property Scenario2: Fetch data basis on students property only with student id value Scenario3: Fetch data basis on class Property only with student id value

help me out to write queries for above scenario with RealmDB. Thank you in advance

0

There are 0 answers