Class: QueryConsole::ExplainRunner::ExplainResult
- Inherits:
-
Object
- Object
- QueryConsole::ExplainRunner::ExplainResult
- Defined in:
- app/services/query_console/explain_runner.rb
Instance Attribute Summary collapse
-
#error ⇒ Object
readonly
Returns the value of attribute error.
-
#execution_time_ms ⇒ Object
readonly
Returns the value of attribute execution_time_ms.
-
#plan_text ⇒ Object
readonly
Returns the value of attribute plan_text.
Instance Method Summary collapse
- #failure? ⇒ Boolean
-
#initialize(plan_text: nil, execution_time_ms: 0, error: nil) ⇒ ExplainResult
constructor
A new instance of ExplainResult.
- #success? ⇒ Boolean
Constructor Details
#initialize(plan_text: nil, execution_time_ms: 0, error: nil) ⇒ ExplainResult
Returns a new instance of ExplainResult.
8 9 10 11 12 |
# File 'app/services/query_console/explain_runner.rb', line 8 def initialize(plan_text: nil, execution_time_ms: 0, error: nil) @plan_text = plan_text @execution_time_ms = execution_time_ms @error = error end |
Instance Attribute Details
#error ⇒ Object (readonly)
Returns the value of attribute error.
6 7 8 |
# File 'app/services/query_console/explain_runner.rb', line 6 def error @error end |
#execution_time_ms ⇒ Object (readonly)
Returns the value of attribute execution_time_ms.
6 7 8 |
# File 'app/services/query_console/explain_runner.rb', line 6 def execution_time_ms @execution_time_ms end |
#plan_text ⇒ Object (readonly)
Returns the value of attribute plan_text.
6 7 8 |
# File 'app/services/query_console/explain_runner.rb', line 6 def plan_text @plan_text end |
Instance Method Details
#failure? ⇒ Boolean
18 19 20 |
# File 'app/services/query_console/explain_runner.rb', line 18 def failure? !success? end |
#success? ⇒ Boolean
14 15 16 |
# File 'app/services/query_console/explain_runner.rb', line 14 def success? @error.nil? end |