Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adds basic support for queries generated by
#find_by_sql
Relates to #32 Allows exporting data that was generated by [find_by_sql][]. This can be desirable when the caller is required to export a calculated field that is not stored directly on the table as demonstrated below. ```ruby User.find_by_sql("SELECT id, 'custom_value' AS custom_field FROM users") ArtVandelay::Export.new(export).csv ``` As such, this feature does not support the `in_batches_of` option, since that would be the responsibility of the query. This feature also does not (yet) support the `attributes` option. [find_by_sql]: https://api.rubyonrails.org/classes/ActiveRecord/Querying.html#method-i-find_by_sql
- Loading branch information