Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/sqlite/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/angular/33.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Android 使用greenDao在以下场景中选择行的最佳方法?_Android_Sqlite_Greendao - Fatal编程技术网

Android 使用greenDao在以下场景中选择行的最佳方法?

Android 使用greenDao在以下场景中选择行的最佳方法?,android,sqlite,greendao,Android,Sqlite,Greendao,我有三张桌子: Manager: manager_id, taluka_name Employee: employee_id, employee_manager_id Target: target_id, target_employee_id 现在我必须显示所有目标的列表视图taluka_namewise。 我正在使用greenDao与SQlite数据库进行交互 这是我尝试的过程,使用我使用的方法花费的时间太长: Step1: Get Manage

我有三张桌子:

    Manager: manager_id, taluka_name  
    Employee: employee_id, employee_manager_id   
    Target: target_id, target_employee_id  
现在我必须显示所有目标的列表视图taluka_namewise。 我正在使用greenDao与SQlite数据库进行交互

这是我尝试的过程,使用我使用的方法花费的时间太长:

    Step1: Get Manager ID for the taluka name from the DB.
    Step2: Get Employee for the Target table->Employee ID.
    Step3: Get Manager ID from the Employee table.
    Step4: Compare if Both Manager ID are equal {if YES then target 
           belongs to that taluka}
下面是我想使用Greendao完成的查询类型

        SELECT *
        FROM target t, location l, current c
        WHERE t.target_location_id = l.location_id
        AND t.target_location_id = c.school_id
        AND t.target_status <> '0'
        AND t.target_status <> '4'
        AND DATEDIFF(NOW(),t.target_exec_end_time)<7
选择*
来自目标t,位置l,当前c
其中t.target\u location\u id=l.location\u id
t.target\u location\u id=c.school\u id
和t.target_状态“0”
和t.target_状态“4”

和DATEDIFF(NOW(),t.target\u exec\u end\u time)您想要实现什么?请提供更多的细节。@greenrobot先生,请给我一些时间,我会的,试着改变这个问题,让它不那么混乱。同样感谢您的回复。@greenrobot,先生,我已经添加了我希望使用greendao完成的查询类型。