Class: Rafflesia::QueryExplainData

Inherits:
Types::BaseModel
  • Object
show all
Defined in:
lib/rafflesia/query/query_explain_data.rb

Constant Summary collapse

HASH_ATTRS =
{
  admission: :admission,
  applied_budget: :applied_budget,
  budget_profile: :budget_profile,
  columns: :columns,
  dialect: :dialect,
  engine: :engine,
  estimated_bytes_scanned: :estimated_bytes_scanned,
  estimated_rows_scanned: :estimated_rows_scanned,
  id: :id,
  join_explanations: :join_explanations,
  metadata_cache_hit_count: :metadata_cache_hit_count,
  object: :object,
  object_read_backend: :object_read_backend,
  object_read_bytes: :object_read_bytes,
  object_read_count: :object_read_count,
  object_read_measurement_kind: :object_read_measurement_kind,
  ontology_digest: :ontology_digest,
  ontology_version: :ontology_version,
  planning_ms: :planning_ms,
  query_digest: :query_digest,
  queue_wait_ms: :queue_wait_ms,
  release_checks: :release_checks,
  sources: :sources,
  sql: :sql,
  steps: :steps,
  verified_join_approvals: :verified_join_approvals,
  verified_join_evidence: :verified_join_evidence
}.freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(json) ⇒ QueryExplainData

Returns a new instance of QueryExplainData.



67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
# File 'lib/rafflesia/query/query_explain_data.rb', line 67

def initialize(json)
  super()
  hash = self.class.normalize(json)
  @admission = hash[:admission] ? Rafflesia::QueryAdmissionSummary.new(hash[:admission]) : nil
  @applied_budget = hash[:applied_budget] ? Rafflesia::QueryBudget.new(hash[:applied_budget]) : nil
  @budget_profile = hash[:budget_profile]
  @columns = (hash[:columns] || []).map { |item| item ? Rafflesia::TableColumn.new(item) : nil }
  @dialect = hash[:dialect]
  @engine = hash[:engine]
  @estimated_bytes_scanned = hash[:estimated_bytes_scanned]
  @estimated_rows_scanned = hash[:estimated_rows_scanned]
  @id = hash[:id]
  @join_explanations = (hash[:join_explanations] || []).map { |item| item ? Rafflesia::QueryJoinExplanation.new(item) : nil }
  @metadata_cache_hit_count = hash[:metadata_cache_hit_count]
  @object = hash[:object]
  @object_read_backend = hash[:object_read_backend]
  @object_read_bytes = hash[:object_read_bytes]
  @object_read_count = hash[:object_read_count]
  @object_read_measurement_kind = hash[:object_read_measurement_kind]
  @ontology_digest = hash[:ontology_digest]
  @ontology_version = hash[:ontology_version]
  @planning_ms = hash[:planning_ms]
  @query_digest = hash[:query_digest]
  @queue_wait_ms = hash[:queue_wait_ms]
  @release_checks = (hash[:release_checks] || []).map { |item| item ? Rafflesia::QueryReleaseCheck.new(item) : nil }
  @sources = (hash[:sources] || []).map { |item| item ? Rafflesia::ResolvedQuerySource.new(item) : nil }
  @sql = hash[:sql]
  @steps = (hash[:steps] || []).map { |item| item ? Rafflesia::QueryPlanStep.new(item) : nil }
  @verified_join_approvals = (hash[:verified_join_approvals] || []).map { |item| item ? Rafflesia::VerifiedRegistryJoinApproval.new(item) : nil }
  @verified_join_evidence = (hash[:verified_join_evidence] || []).map { |item| item ? Rafflesia::VerifiedDatabaseJoinEvidence.new(item) : nil }
end

Instance Attribute Details

#admissionObject

Returns the value of attribute admission.



38
39
40
# File 'lib/rafflesia/query/query_explain_data.rb', line 38

def admission
  @admission
end

#applied_budgetObject

Returns the value of attribute applied_budget.



38
39
40
# File 'lib/rafflesia/query/query_explain_data.rb', line 38

def applied_budget
  @applied_budget
end

#budget_profileObject

Returns the value of attribute budget_profile.



38
39
40
# File 'lib/rafflesia/query/query_explain_data.rb', line 38

def budget_profile
  @budget_profile
end

#columnsObject

Returns the value of attribute columns.



38
39
40
# File 'lib/rafflesia/query/query_explain_data.rb', line 38

def columns
  @columns
end

#dialectObject

Returns the value of attribute dialect.



38
39
40
# File 'lib/rafflesia/query/query_explain_data.rb', line 38

def dialect
  @dialect
end

#engineObject

Returns the value of attribute engine.



38
39
40
# File 'lib/rafflesia/query/query_explain_data.rb', line 38

def engine
  @engine
end

#estimated_bytes_scannedObject

Returns the value of attribute estimated_bytes_scanned.



38
39
40
# File 'lib/rafflesia/query/query_explain_data.rb', line 38

def estimated_bytes_scanned
  @estimated_bytes_scanned
end

#estimated_rows_scannedObject

Returns the value of attribute estimated_rows_scanned.



38
39
40
# File 'lib/rafflesia/query/query_explain_data.rb', line 38

def estimated_rows_scanned
  @estimated_rows_scanned
end

#idObject

Returns the value of attribute id.



38
39
40
# File 'lib/rafflesia/query/query_explain_data.rb', line 38

def id
  @id
end

#join_explanationsObject

Returns the value of attribute join_explanations.



38
39
40
# File 'lib/rafflesia/query/query_explain_data.rb', line 38

def join_explanations
  @join_explanations
end

#metadata_cache_hit_countObject

Returns the value of attribute metadata_cache_hit_count.



38
39
40
# File 'lib/rafflesia/query/query_explain_data.rb', line 38

def 
  @metadata_cache_hit_count
end

#objectObject

Returns the value of attribute object.



38
39
40
# File 'lib/rafflesia/query/query_explain_data.rb', line 38

def object
  @object
end

#object_read_backendObject

Returns the value of attribute object_read_backend.



38
39
40
# File 'lib/rafflesia/query/query_explain_data.rb', line 38

def object_read_backend
  @object_read_backend
end

#object_read_bytesObject

Returns the value of attribute object_read_bytes.



38
39
40
# File 'lib/rafflesia/query/query_explain_data.rb', line 38

def object_read_bytes
  @object_read_bytes
end

#object_read_countObject

Returns the value of attribute object_read_count.



38
39
40
# File 'lib/rafflesia/query/query_explain_data.rb', line 38

def object_read_count
  @object_read_count
end

#object_read_measurement_kindObject

Returns the value of attribute object_read_measurement_kind.



38
39
40
# File 'lib/rafflesia/query/query_explain_data.rb', line 38

def object_read_measurement_kind
  @object_read_measurement_kind
end

#ontology_digestObject

Returns the value of attribute ontology_digest.



38
39
40
# File 'lib/rafflesia/query/query_explain_data.rb', line 38

def ontology_digest
  @ontology_digest
end

#ontology_versionObject

Returns the value of attribute ontology_version.



38
39
40
# File 'lib/rafflesia/query/query_explain_data.rb', line 38

def ontology_version
  @ontology_version
end

#planning_msObject

Returns the value of attribute planning_ms.



38
39
40
# File 'lib/rafflesia/query/query_explain_data.rb', line 38

def planning_ms
  @planning_ms
end

#query_digestObject

Returns the value of attribute query_digest.



38
39
40
# File 'lib/rafflesia/query/query_explain_data.rb', line 38

def query_digest
  @query_digest
end

#queue_wait_msObject

Returns the value of attribute queue_wait_ms.



38
39
40
# File 'lib/rafflesia/query/query_explain_data.rb', line 38

def queue_wait_ms
  @queue_wait_ms
end

#release_checksObject

Returns the value of attribute release_checks.



38
39
40
# File 'lib/rafflesia/query/query_explain_data.rb', line 38

def release_checks
  @release_checks
end

#sourcesObject

Returns the value of attribute sources.



38
39
40
# File 'lib/rafflesia/query/query_explain_data.rb', line 38

def sources
  @sources
end

#sqlObject

Returns the value of attribute sql.



38
39
40
# File 'lib/rafflesia/query/query_explain_data.rb', line 38

def sql
  @sql
end

#stepsObject

Returns the value of attribute steps.



38
39
40
# File 'lib/rafflesia/query/query_explain_data.rb', line 38

def steps
  @steps
end

#verified_join_approvalsObject

Returns the value of attribute verified_join_approvals.



38
39
40
# File 'lib/rafflesia/query/query_explain_data.rb', line 38

def verified_join_approvals
  @verified_join_approvals
end

#verified_join_evidenceObject

Returns the value of attribute verified_join_evidence.



38
39
40
# File 'lib/rafflesia/query/query_explain_data.rb', line 38

def verified_join_evidence
  @verified_join_evidence
end