Class: Flydata::Api::RedshiftCluster
- Defined in:
- lib/flydata/api/redshift_cluster.rb
Instance Method Summary collapse
-
#initialize(api_client) ⇒ RedshiftCluster
constructor
A new instance of RedshiftCluster.
- #run_query(sql) ⇒ Object
Methods inherited from Base
Constructor Details
#initialize(api_client) ⇒ RedshiftCluster
Returns a new instance of RedshiftCluster.
4 5 6 7 8 |
# File 'lib/flydata/api/redshift_cluster.rb', line 4 def initialize(api_client) @model_name = 'redshift_cluster' @url_path = "/#{@model_name.pluralize}" super end |
Instance Method Details
#run_query(sql) ⇒ Object
10 11 12 |
# File 'lib/flydata/api/redshift_cluster.rb', line 10 def run_query(sql) @client.post("#{@url_path}/query", nil, {redshift_query: {body: sql}}) end |