Class: Dataclips::SQLQuery
- Inherits:
-
Object
- Object
- Dataclips::SQLQuery
- Defined in:
- app/models/dataclips/sql_query.rb
Instance Attribute Summary collapse
-
#configuration ⇒ Object
Returns the value of attribute configuration.
-
#schema ⇒ Object
Returns the value of attribute schema.
-
#template ⇒ Object
Returns the value of attribute template.
Instance Method Summary collapse
-
#initialize(sqlfile) ⇒ SQLQuery
constructor
A new instance of SQLQuery.
- #options ⇒ Object
- #variables ⇒ Object
Constructor Details
#initialize(sqlfile) ⇒ SQLQuery
Returns a new instance of SQLQuery.
5 6 7 8 |
# File 'app/models/dataclips/sql_query.rb', line 5 def initialize(sqlfile) @template = parse_template(sqlfile) @configuration = parse_configuration(sqlfile) end |
Instance Attribute Details
#configuration ⇒ Object
Returns the value of attribute configuration.
3 4 5 |
# File 'app/models/dataclips/sql_query.rb', line 3 def configuration @configuration end |
#schema ⇒ Object
Returns the value of attribute schema.
3 4 5 |
# File 'app/models/dataclips/sql_query.rb', line 3 def schema @schema end |
#template ⇒ Object
Returns the value of attribute template.
3 4 5 |
# File 'app/models/dataclips/sql_query.rb', line 3 def template @template end |
Instance Method Details
#options ⇒ Object
18 19 20 |
# File 'app/models/dataclips/sql_query.rb', line 18 def @configuration["options"] || {} end |
#variables ⇒ Object
14 15 16 |
# File 'app/models/dataclips/sql_query.rb', line 14 def variables configuration["variables"] || {} end |