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/5/actionscript-3/7.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 Room或SQLite查询以检索列表中的所有内容?_Sqlite_Android Room - Fatal编程技术网

Android Room或SQLite查询以检索列表中的所有内容?

Android Room或SQLite查询以检索列表中的所有内容?,sqlite,android-room,Sqlite,Android Room,查询是否可以从列表中检索所有值?而不是检索一个,比如在中使用时 正在检索一个结果: @Query(“从author_表中选择authorState,其中name位于(:nameList)”) LiveData getStatesForAllAuthors(列表名称列表); 我想要像这样的东西: @Query("select authorState from author_table where *get every* name IN (:nameList)") Li

查询是否可以从列表中检索所有值?而不是检索一个,比如在中使用

正在检索一个结果:

@Query(“从author_表中选择authorState,其中name位于(:nameList)”)
LiveData getStatesForAllAuthors(列表名称列表);
我想要像这样的东西:

  @Query("select authorState from author_table where *get every* name IN (:nameList)")
  LiveData<List<String>> getStatesForAllAuthors(List<String> nameList);
@Query(“从author_表中选择authorState,其中*在(:nameList)中获取每个*名称”)
LiveData getStatesForAllAuthors(列表名称列表);

请检查名称列表中各个值的格式,特别是这些值的分隔方式。详情请参阅
  @Query("select authorState from author_table where *get every* name IN (:nameList)")
  LiveData<List<String>> getStatesForAllAuthors(List<String> nameList);