for ex :
the employee table would have coloumns as empId,name
the course table would have columns as empId,courseId,courseName
getEmployee: SELECT * FROM EMPLOYEE LEFT JOIN COURSE on EMPLOYEE.empId = COURSE.empId WHERE dept = 'Sales'
the result of the above query will be a data class containing both table’s fields
like
GetEmployee( empId:String, name:String, courseId:String?, courseName:String? )
Note: the second table’s fields becomes nullable types , so i get to check all the fields if its null
when i map these to an usable data class code becomes too mess,
is there any better approach to handle relations,joins in sqldelight ?????
i was expecting the second tables data will be a list inside a data class of first table.