Class: SQLiteSweep::Query::Base
- Inherits:
-
Object
- Object
- SQLiteSweep::Query::Base
- Defined in:
- lib/sqlitesweep/query/base.rb
Overview
Abstract base class for query executors.
Subclasses must implement #execute(uri) which runs the configured SQL query against the given database and returns a Result.
Two implementations:
- Query::Local
Instance Method Summary collapse
-
#execute(uri) ⇒ Result
Executes the configured query against the given database.
-
#initialize(config) ⇒ Base
constructor
A new instance of Base.
Constructor Details
#initialize(config) ⇒ Base
Returns a new instance of Base.
13 14 15 |
# File 'lib/sqlitesweep/query/base.rb', line 13 def initialize(config) @config = config end |
Instance Method Details
#execute(uri) ⇒ Result
Executes the configured query against the given database.
22 23 24 |
# File 'lib/sqlitesweep/query/base.rb', line 22 def execute(uri) raise NotImplementedError end |