Class: Cmap::EdgesToQueries
- Inherits:
-
Object
- Object
- Cmap::EdgesToQueries
- Defined in:
- lib/cmap/edges_to_queries.rb
Instance Attribute Summary collapse
-
#edges ⇒ Object
readonly
Returns the value of attribute edges.
-
#schema_name ⇒ Object
readonly
Returns the value of attribute schema_name.
-
#subquery_expander ⇒ Object
readonly
Returns the value of attribute subquery_expander.
-
#table_name ⇒ Object
readonly
Returns the value of attribute table_name.
Instance Method Summary collapse
-
#initialize(edges, table_name, schema_name, subquery_expander) ⇒ EdgesToQueries
constructor
A new instance of EdgesToQueries.
- #queries ⇒ Object
Constructor Details
#initialize(edges, table_name, schema_name, subquery_expander) ⇒ EdgesToQueries
Returns a new instance of EdgesToQueries.
5 6 7 8 9 10 |
# File 'lib/cmap/edges_to_queries.rb', line 5 def initialize(edges, table_name, schema_name, ) @edges = edges @table_name = table_name @schema_name = schema_name @subquery_expander = end |
Instance Attribute Details
#edges ⇒ Object (readonly)
Returns the value of attribute edges.
3 4 5 |
# File 'lib/cmap/edges_to_queries.rb', line 3 def edges @edges end |
#schema_name ⇒ Object (readonly)
Returns the value of attribute schema_name.
3 4 5 |
# File 'lib/cmap/edges_to_queries.rb', line 3 def schema_name @schema_name end |
#subquery_expander ⇒ Object (readonly)
Returns the value of attribute subquery_expander.
3 4 5 |
# File 'lib/cmap/edges_to_queries.rb', line 3 def @subquery_expander end |
#table_name ⇒ Object (readonly)
Returns the value of attribute table_name.
3 4 5 |
# File 'lib/cmap/edges_to_queries.rb', line 3 def table_name @table_name end |
Instance Method Details
#queries ⇒ Object
12 13 14 15 16 17 |
# File 'lib/cmap/edges_to_queries.rb', line 12 def queries add_columns_queries + gsub_subqueries + updates .delete_if {|q| q.empty?} end |