Class: Dexter::Query
- Inherits:
-
Object
- Object
- Dexter::Query
- Defined in:
- lib/dexter/query.rb
Instance Attribute Summary collapse
-
#fingerprint ⇒ Object
readonly
Returns the value of attribute fingerprint.
-
#initial_cost ⇒ Object
Returns the value of attribute initial_cost.
-
#missing_tables ⇒ Object
Returns the value of attribute missing_tables.
-
#new_cost ⇒ Object
Returns the value of attribute new_cost.
-
#statement ⇒ Object
readonly
Returns the value of attribute statement.
Instance Method Summary collapse
-
#initialize(statement, fingerprint) ⇒ Query
constructor
A new instance of Query.
- #tables ⇒ Object
Constructor Details
#initialize(statement, fingerprint) ⇒ Query
Returns a new instance of Query.
6 7 8 9 |
# File 'lib/dexter/query.rb', line 6 def initialize(statement, fingerprint) @statement = statement @fingerprint = fingerprint end |
Instance Attribute Details
#fingerprint ⇒ Object (readonly)
Returns the value of attribute fingerprint.
3 4 5 |
# File 'lib/dexter/query.rb', line 3 def fingerprint @fingerprint end |
#initial_cost ⇒ Object
Returns the value of attribute initial_cost.
4 5 6 |
# File 'lib/dexter/query.rb', line 4 def initial_cost @initial_cost end |
#missing_tables ⇒ Object
Returns the value of attribute missing_tables.
4 5 6 |
# File 'lib/dexter/query.rb', line 4 def missing_tables @missing_tables end |
#new_cost ⇒ Object
Returns the value of attribute new_cost.
4 5 6 |
# File 'lib/dexter/query.rb', line 4 def new_cost @new_cost end |
#statement ⇒ Object (readonly)
Returns the value of attribute statement.
3 4 5 |
# File 'lib/dexter/query.rb', line 3 def statement @statement end |
Instance Method Details
#tables ⇒ Object
11 12 13 |
# File 'lib/dexter/query.rb', line 11 def tables @tables ||= PgQuery.parse(statement).tables rescue [] end |