Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/postgresql/10.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
Ruby on rails 3 在hstore Rails3中搜索数组字段数据_Ruby On Rails 3_Postgresql_Hstore - Fatal编程技术网

Ruby on rails 3 在hstore Rails3中搜索数组字段数据

Ruby on rails 3 在hstore Rails3中搜索数组字段数据,ruby-on-rails-3,postgresql,hstore,Ruby On Rails 3,Postgresql,Hstore,使用hstore,将数据存储为 properties = {"1"=>"Test", "2"=["One","Two","Three"]} 需要创建一个过滤器,我想在其中搜索数组值,比如我把2=>“一”或2=>“一”,“二”,所以它应该给我发送这个记录。我已经阅读了hstoregemwikki,但找不到任何与之相关的数据 hstore不是结构化类型。您可能需要支持嵌套结构的jsonb。在hstore中,该数组将只是一个blob。@CraigRinger这意味着我们无法搜索数组中提到的数据

使用hstore,将数据存储为

properties = {"1"=>"Test", "2"=["One","Two","Three"]}

需要创建一个过滤器,我想在其中搜索数组值,比如我把2=>“一”或2=>“一”,“二”,所以它应该给我发送这个记录。我已经阅读了
hstore
gemwikki,但找不到任何与之相关的数据

hstore不是结构化类型。您可能需要支持嵌套结构的
jsonb
。在
hstore
中,该数组将只是一个blob。@CraigRinger这意味着我们无法搜索数组中提到的数据?