Class: Altertable::Lakehouse::Models::QueryRequest

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, compute_size: nil, sanitize: nil, limit: nil, offset: nil, timezone: nil, ephemeral: nil, visible: nil, requested_by: nil, query_id: nil, cache: nil) ⇒ QueryRequest

Returns a new instance of QueryRequest.



59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
# File 'lib/altertable/lakehouse/models.rb', line 59

def initialize(statement:, catalog: nil, schema: nil, session_id: nil, compute_size: nil, sanitize: nil, limit: nil, offset: nil, timezone: nil, ephemeral: nil, visible: nil, requested_by: nil, query_id: nil, cache: nil)
  @statement = statement
  @catalog = catalog
  @schema = schema
  @session_id = session_id
  @compute_size = compute_size
  @sanitize = sanitize
  @limit = limit
  @offset = offset
  @timezone = timezone
  @ephemeral = ephemeral
  @visible = visible
  @requested_by = requested_by
  @query_id = query_id
  @cache = cache
end

Instance Attribute Details

#cacheObject (readonly)

Returns the value of attribute cache.



57
58
59
# File 'lib/altertable/lakehouse/models.rb', line 57

def cache
  @cache
end

#catalogObject (readonly)

Returns the value of attribute catalog.



57
58
59
# File 'lib/altertable/lakehouse/models.rb', line 57

def catalog
  @catalog
end

#compute_sizeObject (readonly)

Returns the value of attribute compute_size.



57
58
59
# File 'lib/altertable/lakehouse/models.rb', line 57

def compute_size
  @compute_size
end

#ephemeralObject (readonly)

Returns the value of attribute ephemeral.



57
58
59
# File 'lib/altertable/lakehouse/models.rb', line 57

def ephemeral
  @ephemeral
end

#limitObject (readonly)

Returns the value of attribute limit.



57
58
59
# File 'lib/altertable/lakehouse/models.rb', line 57

def limit
  @limit
end

#offsetObject (readonly)

Returns the value of attribute offset.



57
58
59
# File 'lib/altertable/lakehouse/models.rb', line 57

def offset
  @offset
end

#query_idObject (readonly)

Returns the value of attribute query_id.



57
58
59
# File 'lib/altertable/lakehouse/models.rb', line 57

def query_id
  @query_id
end

#requested_byObject (readonly)

Returns the value of attribute requested_by.



57
58
59
# File 'lib/altertable/lakehouse/models.rb', line 57

def requested_by
  @requested_by
end

#sanitizeObject (readonly)

Returns the value of attribute sanitize.



57
58
59
# File 'lib/altertable/lakehouse/models.rb', line 57

def sanitize
  @sanitize
end

#schemaObject (readonly)

Returns the value of attribute schema.



57
58
59
# File 'lib/altertable/lakehouse/models.rb', line 57

def schema
  @schema
end

#session_idObject (readonly)

Returns the value of attribute session_id.



57
58
59
# File 'lib/altertable/lakehouse/models.rb', line 57

def session_id
  @session_id
end

#statementObject (readonly)

Returns the value of attribute statement.



57
58
59
# File 'lib/altertable/lakehouse/models.rb', line 57

def statement
  @statement
end

#timezoneObject (readonly)

Returns the value of attribute timezone.



57
58
59
# File 'lib/altertable/lakehouse/models.rb', line 57

def timezone
  @timezone
end

#visibleObject (readonly)

Returns the value of attribute visible.



57
58
59
# File 'lib/altertable/lakehouse/models.rb', line 57

def visible
  @visible
end

Instance Method Details

#to_hObject



76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
# File 'lib/altertable/lakehouse/models.rb', line 76

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[:compute_size] = @compute_size if @compute_size
  h[:sanitize] = @sanitize unless @sanitize.nil?
  h[:limit] = @limit if @limit
  h[:offset] = @offset if @offset
  h[:timezone] = @timezone if @timezone
  h[:ephemeral] = @ephemeral unless @ephemeral.nil?
  h[:visible] = @visible unless @visible.nil?
  h[:requested_by] = @requested_by if @requested_by
  h[:query_id] = @query_id if @query_id
  h[:cache] = @cache unless @cache.nil?
  h
end