Class: Retab::WorkflowTableExplain
- Inherits:
-
Types::BaseModel
- Object
- Types::BaseModel
- Retab::WorkflowTableExplain
- Defined in:
- lib/retab/tables/workflow_table_explain.rb
Constant Summary collapse
- HASH_ATTRS =
{ table_id: :table_id, snapshot_file_id: :snapshot_file_id, selected_columns: :selected_columns, filters: :filters, search: :search, sort: :sort, offset: :offset, limit: :limit, distinct: :distinct, group_by: :group_by, aggregations: :aggregations }.freeze
Instance Attribute Summary collapse
-
#aggregations ⇒ Object
Returns the value of attribute aggregations.
-
#distinct ⇒ Object
Returns the value of attribute distinct.
-
#filters ⇒ Object
Returns the value of attribute filters.
-
#group_by ⇒ Object
Returns the value of attribute group_by.
-
#limit ⇒ Object
Returns the value of attribute limit.
-
#offset ⇒ Object
Returns the value of attribute offset.
-
#search ⇒ Object
Returns the value of attribute search.
-
#selected_columns ⇒ Object
Returns the value of attribute selected_columns.
-
#snapshot_file_id ⇒ Object
Returns the value of attribute snapshot_file_id.
-
#sort ⇒ Object
Returns the value of attribute sort.
-
#table_id ⇒ Object
Returns the value of attribute table_id.
Attributes inherited from Types::BaseModel
Instance Method Summary collapse
-
#initialize(json) ⇒ WorkflowTableExplain
constructor
A new instance of WorkflowTableExplain.
Methods inherited from Types::BaseModel
deep_symbolize, #inspect, normalize, #to_h, #to_json
Constructor Details
#initialize(json) ⇒ WorkflowTableExplain
Returns a new instance of WorkflowTableExplain.
36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 |
# File 'lib/retab/tables/workflow_table_explain.rb', line 36 def initialize(json) super() hash = self.class.normalize(json) @table_id = hash[:table_id] @snapshot_file_id = hash[:snapshot_file_id].nil? ? "" : hash[:snapshot_file_id] @selected_columns = (hash[:selected_columns] || []) @filters = (hash[:filters] || []).map { |item| item ? Retab::WorkflowTableFilterRule.new(item) : nil } @search = hash[:search] ? Retab::WorkflowTableSearchRequest.new(hash[:search]) : nil @sort = (hash[:sort] || []).map { |item| item ? Retab::WorkflowTableSortRule.new(item) : nil } @offset = hash[:offset] @limit = hash[:limit] @distinct = hash[:distinct] ? Retab::WorkflowTableDistinctRequest.new(hash[:distinct]) : nil @group_by = (hash[:group_by] || []) @aggregations = (hash[:aggregations] || []).map { |item| item ? Retab::WorkflowTableAggregationRequest.new(item) : nil } end |
Instance Attribute Details
#aggregations ⇒ Object
Returns the value of attribute aggregations.
22 23 24 |
# File 'lib/retab/tables/workflow_table_explain.rb', line 22 def aggregations @aggregations end |
#distinct ⇒ Object
Returns the value of attribute distinct.
22 23 24 |
# File 'lib/retab/tables/workflow_table_explain.rb', line 22 def distinct @distinct end |
#filters ⇒ Object
Returns the value of attribute filters.
22 23 24 |
# File 'lib/retab/tables/workflow_table_explain.rb', line 22 def filters @filters end |
#group_by ⇒ Object
Returns the value of attribute group_by.
22 23 24 |
# File 'lib/retab/tables/workflow_table_explain.rb', line 22 def group_by @group_by end |
#limit ⇒ Object
Returns the value of attribute limit.
22 23 24 |
# File 'lib/retab/tables/workflow_table_explain.rb', line 22 def limit @limit end |
#offset ⇒ Object
Returns the value of attribute offset.
22 23 24 |
# File 'lib/retab/tables/workflow_table_explain.rb', line 22 def offset @offset end |
#search ⇒ Object
Returns the value of attribute search.
22 23 24 |
# File 'lib/retab/tables/workflow_table_explain.rb', line 22 def search @search end |
#selected_columns ⇒ Object
Returns the value of attribute selected_columns.
22 23 24 |
# File 'lib/retab/tables/workflow_table_explain.rb', line 22 def selected_columns @selected_columns end |
#snapshot_file_id ⇒ Object
Returns the value of attribute snapshot_file_id.
22 23 24 |
# File 'lib/retab/tables/workflow_table_explain.rb', line 22 def snapshot_file_id @snapshot_file_id end |
#sort ⇒ Object
Returns the value of attribute sort.
22 23 24 |
# File 'lib/retab/tables/workflow_table_explain.rb', line 22 def sort @sort end |
#table_id ⇒ Object
Returns the value of attribute table_id.
22 23 24 |
# File 'lib/retab/tables/workflow_table_explain.rb', line 22 def table_id @table_id end |