Class: Ductr::SQLite::BasicSource
- Inherits:
-
ETL::Source
- Object
- ETL::Source
- Ductr::SQLite::BasicSource
- Defined in:
- lib/ductr/sqlite/basic_source.rb
Overview
A source control that yields rows one by one, registered as :basic
:
source :some_sqlite_database, :basic def select_some_stuff(db) db[:items].limit(42) end
Do not try to select a large number of rows, as they will all be loaded into memory.
Instance Method Summary collapse
-
#each { ... } ⇒ void
Opens the database, calls the job's method and iterate over the query results.
Instance Method Details
#each { ... } ⇒ void
This method returns an undefined value.
Opens the database, calls the job's method and iterate over the query results.
25 26 27 |
# File 'lib/ductr/sqlite/basic_source.rb', line 25 def each(&) call_method(adapter.db).each(&) end |