cockroachdb / cockroachdb/activerecord-cockroachdb-adapter
Prepared statement error on varchar array columns
- 主要言語
- Ruby
- スター
- 105
- フォーク
- 56
- 平均マージ
- 9時間 5分
- マージ済み PR(30日)
- 3
説明
Version 7.2 of the adapter seems to reject `? = ANY(array_column)` queries.
### Steps to Reproduce:
Install and run CockroachDB v25.1.2 locally.
Create a Rails application using the following packages.
```ruby
gem 'activerecord-cockroachdb-adapter', '~> 7.2'
gem 'rails', '~> 7.2.2'
```
Create a table containing a column containing a string array using the following script:
```ruby
class AddUsers < ActiveRecord::Migration[7.2]
def change
create_table :users do |t|
t.string :languages, array: true
end
end
end
```
Complete the migration. Open Rails console and run: `User.where('? = ANY(languages)', 'en')`.
This error is raised:
`#`
I am able to run `select * from users where 'en' = ANY (languages)` directly in CockroachDB, so I think that the error is caused by the driver.
The same statement runs without issues on Postgres 12.
コントリビューションガイド
評価
この issue はまだ評価されていません。