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

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

Class Method Summary collapse

Class Method Details

.decode(hash) ⇒ Object



355
356
357
358
359
360
361
362
363
364
365
# File 'lib/trino/client/model_versions/351.rb', line 355

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