class TinyDyno::Errors::OnlyOneHashKeyPermitted
This error is raised, when a query is performed with fields specified that are not HashKeys, which would result in a table scan
Public Class Methods
new(klass:, name:)
click to toggle source
Create the new error.
@example Instantiate the error.
OnlyOneHashKeyPermitted.new(Person, "gender")
@param [ Class ] klass The model class. @param [ String, Symbol ] name The name of the attribute.
@since 3.0.0
Calls superclass method
# File lib/tiny_dyno/errors/hash_key_errors.rb, line 96 def initialize(klass:, name:) super( compose_message("you can only define one hash_key", { klass: klass.name, name: name }) ) end