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

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

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

#cacheBoolean? (readonly)

Returns the value of attribute cache.

Returns:

  • (Boolean, nil)


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

def cache
  @cache
end

#catalogString? (readonly)

Returns the value of attribute catalog.

Returns:

  • (String, nil)


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

def catalog
  @catalog
end

#compute_sizeString? (readonly)

Returns the value of attribute compute_size.

Returns:

  • (String, nil)


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

def compute_size
  @compute_size
end

#ephemeralBoolean? (readonly)

Returns the value of attribute ephemeral.

Returns:

  • (Boolean, nil)


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

def ephemeral
  @ephemeral
end

#limitInteger? (readonly)

Returns the value of attribute limit.

Returns:

  • (Integer, nil)


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

def limit
  @limit
end

#offsetInteger? (readonly)

Returns the value of attribute offset.

Returns:

  • (Integer, nil)


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

def offset
  @offset
end

#query_idString? (readonly)

Returns the value of attribute query_id.

Returns:

  • (String, nil)


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

def query_id
  @query_id
end

#requested_byString? (readonly)

Returns the value of attribute requested_by.

Returns:

  • (String, nil)


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

def requested_by
  @requested_by
end

#sanitizeBoolean? (readonly)

Returns the value of attribute sanitize.

Returns:

  • (Boolean, nil)


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

def sanitize
  @sanitize
end

#schemaString? (readonly)

Returns the value of attribute schema.

Returns:

  • (String, nil)


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

def schema
  @schema
end

#session_idString? (readonly)

Returns the value of attribute session_id.

Returns:

  • (String, nil)


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

def session_id
  @session_id
end

#statementString (readonly)

Returns the value of attribute statement.

Returns:

  • (String)


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

def statement
  @statement
end

#timezoneString? (readonly)

Returns the value of attribute timezone.

Returns:

  • (String, nil)


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

def timezone
  @timezone
end

#visibleBoolean? (readonly)

Returns the value of attribute visible.

Returns:

  • (Boolean, nil)


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

def visible
  @visible
end

Instance Method Details

#to_h::Hash[Symbol, untyped]

Returns:

  • (::Hash[Symbol, untyped])


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