Class: Trino::Client::ModelVersions::V303::ArgumentBinding=Base.new(:expression,:constant)

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

Class Method Summary collapse

Class Method Details

.decode(hash) ⇒ Object



351
352
353
354
355
356
357
358
359
360
361
# File 'lib/trino/client/model_versions/303.rb', line 351

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["expression"],
    hash["constant"],
  )
  obj
end