Class: Superset::Database::GetCatalogs
- Defined in:
- lib/superset/database/get_catalogs.rb
Constant Summary
Constants inherited from Request
Instance Attribute Summary collapse
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#include_system_catalogs ⇒ Object
readonly
Returns the value of attribute include_system_catalogs.
Attributes inherited from Request
Class Method Summary collapse
Instance Method Summary collapse
- #catalogs ⇒ Object
-
#initialize(id, include_system_catalogs: false) ⇒ GetCatalogs
constructor
A new instance of GetCatalogs.
Methods inherited from Request
#query_params, #response, #result, #superset_host
Methods included from Superset::Display
#ids, #list, #list_attributes, #result, #rows, #table, #title, #to_h
Constructor Details
#initialize(id, include_system_catalogs: false) ⇒ GetCatalogs
Returns a new instance of GetCatalogs.
7 8 9 10 |
# File 'lib/superset/database/get_catalogs.rb', line 7 def initialize(id, include_system_catalogs: false) @id = id @include_system_catalogs = include_system_catalogs end |
Instance Attribute Details
#id ⇒ Object (readonly)
Returns the value of attribute id.
5 6 7 |
# File 'lib/superset/database/get_catalogs.rb', line 5 def id @id end |
#include_system_catalogs ⇒ Object (readonly)
Returns the value of attribute include_system_catalogs.
5 6 7 |
# File 'lib/superset/database/get_catalogs.rb', line 5 def include_system_catalogs @include_system_catalogs end |
Class Method Details
.call(id) ⇒ Object
12 13 14 |
# File 'lib/superset/database/get_catalogs.rb', line 12 def self.call(id) self.new(id).catalogs end |
Instance Method Details
#catalogs ⇒ Object
16 17 18 19 20 |
# File 'lib/superset/database/get_catalogs.rb', line 16 def catalogs return result if include_system_catalogs remove_system_catalogs end |