Class: Sequel::Amalgalite::Dataset

Inherits:
Dataset
  • Object
show all
Includes:
SQLite::DatasetMethods
Defined in:
lib/sequel/adapters/amalgalite.rb

Constant Summary

Constants included from SQLite::DatasetMethods

SQLite::DatasetMethods::CONSTANT_MAP, SQLite::DatasetMethods::EXTRACT_MAP, SQLite::DatasetMethods::INSERT_CONFLICT_RESOLUTIONS

Instance Method Summary collapse

Methods included from SQLite::DatasetMethods

#cast_sql_append, #complex_expression_sql_append, #constant_sql_append, #delete, #empty?, #explain, #having, #insert_conflict, #insert_ignore, #insert_select, #insert_select_sql, #quoted_identifier_append, #returning, #select, #supports_cte?, #supports_cte_in_subqueries?, #supports_deleting_joins?, #supports_derived_column_lists?, #supports_intersect_except_all?, #supports_is_true?, #supports_modifying_joins?, #supports_multiple_column_in?, #supports_returning?, #supports_timestamp_timezones?, #supports_where_true?, #supports_window_clause?, #supports_window_function_frame_option?, #supports_window_functions?

Instance Method Details

#fetch_rows(sql) ⇒ Object



164
165
166
167
168
169
170
171
172
173
174
# File 'lib/sequel/adapters/amalgalite.rb', line 164

def fetch_rows(sql)
  execute(sql) do |stmt|
    self.columns = cols = stmt.result_fields.map{|c| output_identifier(c)}
    col_count = cols.size
    stmt.each do |result|
      row = {}
      col_count.times{|i| row[cols[i]] = result[i]}
      yield row
    end
  end
end