Class: Trino::Client::ModelVersions::V303::LongVariableConstraint=Base.new(:name,:expression)

Inherits:
Object
  • Object
show all
Defined in:
lib/trino/client/model_versions/303.rb

Class Method Summary collapse

Class Method Details

.decode(hash) ⇒ Object



1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
# File 'lib/trino/client/model_versions/303.rb', line 1146

def decode(hash)
  unless hash.is_a?(Hash)
    raise TypeError, "Can't convert #{hash.class} to Hash"
  end
  obj = allocate
  obj.send(:initialize_struct,
    hash["name"],
    hash["expression"],
  )
  obj
end