Class: Cmap::PropositionsToSql
- Inherits:
-
Object
- Object
- Cmap::PropositionsToSql
- Defined in:
- lib/cmap/propositions_to_sql.rb
Instance Attribute Summary collapse
-
#propositions_path ⇒ Object
readonly
Returns the value of attribute propositions_path.
-
#schema_name ⇒ Object
readonly
Returns the value of attribute schema_name.
-
#subquery_gsubs ⇒ Object
readonly
Returns the value of attribute subquery_gsubs.
-
#table_name ⇒ Object
readonly
Returns the value of attribute table_name.
Instance Method Summary collapse
- #graph_to_sql ⇒ Object
-
#initialize(args) ⇒ PropositionsToSql
constructor
A new instance of PropositionsToSql.
- #propositions_to_graph ⇒ Object
- #queries ⇒ Object
- #raw_graph ⇒ Object
- #sanitized_graph ⇒ Object
Constructor Details
#initialize(args) ⇒ PropositionsToSql
Returns a new instance of PropositionsToSql.
5 6 7 8 9 10 |
# File 'lib/cmap/propositions_to_sql.rb', line 5 def initialize(args) @propositions_path = args.fetch(:propositions_path) @table_name = args.fetch(:table_name) @schema_name = args.fetch(:schema_name) @subquery_gsubs = args.fetch(:subquery_gsubs, []) end |
Instance Attribute Details
#propositions_path ⇒ Object (readonly)
Returns the value of attribute propositions_path.
3 4 5 |
# File 'lib/cmap/propositions_to_sql.rb', line 3 def propositions_path @propositions_path end |
#schema_name ⇒ Object (readonly)
Returns the value of attribute schema_name.
3 4 5 |
# File 'lib/cmap/propositions_to_sql.rb', line 3 def schema_name @schema_name end |
#subquery_gsubs ⇒ Object (readonly)
Returns the value of attribute subquery_gsubs.
3 4 5 |
# File 'lib/cmap/propositions_to_sql.rb', line 3 def subquery_gsubs @subquery_gsubs end |
#table_name ⇒ Object (readonly)
Returns the value of attribute table_name.
3 4 5 |
# File 'lib/cmap/propositions_to_sql.rb', line 3 def table_name @table_name end |
Instance Method Details
#graph_to_sql ⇒ Object
28 29 30 |
# File 'lib/cmap/propositions_to_sql.rb', line 28 def graph_to_sql GraphToSql.new(table_name, schema_name, sanitized_graph, subquery_gsubs) end |
#propositions_to_graph ⇒ Object
16 17 18 |
# File 'lib/cmap/propositions_to_sql.rb', line 16 def propositions_to_graph PropositionsToGraph.new(propositions_path) end |
#queries ⇒ Object
12 13 14 |
# File 'lib/cmap/propositions_to_sql.rb', line 12 def queries graph_to_sql.queries end |
#raw_graph ⇒ Object
20 21 22 |
# File 'lib/cmap/propositions_to_sql.rb', line 20 def raw_graph propositions_to_graph.graph end |
#sanitized_graph ⇒ Object
24 25 26 |
# File 'lib/cmap/propositions_to_sql.rb', line 24 def sanitized_graph GraphSanitizer.new(raw_graph).sanitized_graph end |