lazy_columns icon indicating copy to clipboard operation
lazy_columns copied to clipboard

Rails plugin that adds support for lazy-loading columns in Active Record models

Results 4 lazy_columns issues
Sort by recently updated
recently updated
newest added

If I do something like 'Articles.includes(:contentitems)', where contentitems has lazy loaded columns, the resulting query is like: 'select contentitems.[nonlazy columns], contentitems.\* from contentitems', which of course even further degrades performance....

0 - Backlog

The SQL generated when a lazy-load column is present for `Account.count` is: ``` sql SELECT COUNT(accounts.id, accounts.name, accounts.phone,...) ``` rather than `SELECT COUNT(*)`.This is invalid. Also applies to uniqueness validations...

After a column is marked for lazy load, Model.pluck(:attribute) always returns an array of id´s instead of the requested attribute.

The logic is basically to imitate `reload` but only updates some keys in `@attributes`. To make it more confident, I added some tests, including one for #2. Cheers!