Class: Altertable::Lakehouse::Models::ExplainRequest

Inherits:
Request
  • Object
show all
Defined in:
lib/altertable/lakehouse/models.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(statement:, catalog: nil, schema: nil, session_id: nil, include_plan: nil) ⇒ ExplainRequest

Returns a new instance of ExplainRequest.



249
250
251
252
253
254
255
# File 'lib/altertable/lakehouse/models.rb', line 249

def initialize(statement:, catalog: nil, schema: nil, session_id: nil, include_plan: nil)
  @statement = statement
  @catalog = catalog
  @schema = schema
  @session_id = session_id
  @include_plan = include_plan
end

Instance Attribute Details

#catalogObject (readonly)

Returns the value of attribute catalog.



247
248
249
# File 'lib/altertable/lakehouse/models.rb', line 247

def catalog
  @catalog
end

#include_planObject (readonly)

Returns the value of attribute include_plan.



247
248
249
# File 'lib/altertable/lakehouse/models.rb', line 247

def include_plan
  @include_plan
end

#schemaObject (readonly)

Returns the value of attribute schema.



247
248
249
# File 'lib/altertable/lakehouse/models.rb', line 247

def schema
  @schema
end

#session_idObject (readonly)

Returns the value of attribute session_id.



247
248
249
# File 'lib/altertable/lakehouse/models.rb', line 247

def session_id
  @session_id
end

#statementObject (readonly)

Returns the value of attribute statement.



247
248
249
# File 'lib/altertable/lakehouse/models.rb', line 247

def statement
  @statement
end

Instance Method Details

#to_hObject



257
258
259
260
261
262
263
264
# File 'lib/altertable/lakehouse/models.rb', line 257

def to_h
  h = { statement: @statement }
  h[:catalog] = @catalog if @catalog
  h[:schema] = @schema if @schema
  h[:session_id] = @session_id if @session_id
  h[:include_plan] = @include_plan unless @include_plan.nil?
  h
end