We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
type
where
ArgumentError
Using where { type.is(...) } raises ArgumentError: wrong number of arguments (given 0, expected 1).
where { type.is(...) }
ArgumentError: wrong number of arguments (given 0, expected 1)
Run script below:
require 'bundler/inline' gemfile do source 'https://rubygems.org' require 'rom-sql' require 'sqlite3' end config = ROM::Configuration.new(:sql, 'sqlite::memory') config.gateways[:default].create_table(:users) do primary_key :id column :name, String column :type, String end class Users < ROM::Relation[:sql] schema do attribute :id, Types::Serial attribute :name, Types::String attribute :type, Types::Strict::String.enum('User', 'Admin') end end config.register_relation(Users) container = ROM.container(config) users = container.relations[:users] # ArgumentError: wrong number of arguments (given 0, expected 1) p users.where { name.is('Thomas') & type.is('Manager') }.to_a
It does not raise an error but considers type as a database column.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Describe the bug
Using
where { type.is(...) }
raisesArgumentError: wrong number of arguments (given 0, expected 1)
.To Reproduce
Run script below:
Expected behavior
It does not raise an error but considers
type
as a database column.My environment
The text was updated successfully, but these errors were encountered: