Exception: TinyDyno::Errors::InvalidValueType

Inherits:
TinyDynoError
  • Object
show all
Defined in:
lib/tiny_dyno/errors/invalid_type_error.rb

Overview

This error is raised, when a query is performed with fields specified that are not HashKeys, which would result in a table scan

Constant Summary

Constants inherited from TinyDynoError

TinyDynoError::BASE_KEY

Instance Method Summary collapse

Methods inherited from TinyDynoError

#compose_message

Constructor Details

#initialize(klass:, name:, value:) ⇒ InvalidValueType

Create the new error.

Examples:

Instantiate the error.

InvalidSelector.new(Person, "gender")

Parameters:

  • klass (Class)

    The model class.

  • name (String, Symbol)

    The name of the attribute.

Since:

  • 3.0.0



18
19
20
21
22
# File 'lib/tiny_dyno/errors/invalid_type_error.rb', line 18

def initialize(klass:, name:, value:)
  super(
      compose_message("value_not_typecasted", { klass: klass.name, name: name, value: value })
  )
end