Ruby Sequel: Array returned by query is being returned as a String object, not an Array object

前端 未结 1 409
遇见更好的自我
遇见更好的自我 2021-01-21 04:52

I\'m using the pg_array extension of Ruby Sequel.

When I select a column that is a Postgresql array, the result is a string in Ruby. How do I get this to be a Ruby arra

相关标签:
1条回答
  • 2021-01-21 05:13

    You need to use DB.extension :pg_array, :pg_inet, :pg_json, not Sequel.extension :pg_array, :pg_inet, :pg_json. Otherwise you are just requiring the files without modifying the configuration for the Sequel::Database instance.

    0 讨论(0)
提交回复
热议问题