Class: Storing::Postgres::AbstractQuery
- Inherits:
-
AbstractQuery
- Object
- AbstractQuery
- Storing::Postgres::AbstractQuery
- Defined in:
- lib/storing/postgres/abstract_query.rb
Instance Attribute Summary collapse
-
#query_object ⇒ Object
readonly
Returns the value of attribute query_object.
Instance Method Summary collapse
- #dataset(ds) ⇒ Object
-
#initialize(query_object = nil) ⇒ AbstractQuery
constructor
A new instance of AbstractQuery.
- #query(database) ⇒ Object
- #query_chain(database) ⇒ Object
Constructor Details
#initialize(query_object = nil) ⇒ AbstractQuery
Returns a new instance of AbstractQuery.
8 9 10 |
# File 'lib/storing/postgres/abstract_query.rb', line 8 def initialize query_object=nil @query_object = query_object end |
Instance Attribute Details
#query_object ⇒ Object (readonly)
Returns the value of attribute query_object.
6 7 8 |
# File 'lib/storing/postgres/abstract_query.rb', line 6 def query_object @query_object end |
Instance Method Details
#dataset(ds) ⇒ Object
21 22 23 |
# File 'lib/storing/postgres/abstract_query.rb', line 21 def dataset ds raise NotImplementedError end |
#query(database) ⇒ Object
12 13 14 |
# File 'lib/storing/postgres/abstract_query.rb', line 12 def query database query_chain(database).select_sql end |
#query_chain(database) ⇒ Object
16 17 18 19 |
# File 'lib/storing/postgres/abstract_query.rb', line 16 def query_chain database ds = call_query_chain(database) dataset(ds) end |