It’s so simple but imagine if the table people has 30 columns and there
are some columns with type ‘bytea’ (or large object / binary data)
holding MB-s data, then you only need three columns only with type
‘string’, ‘string’, ‘int’. It’s a waste of time using that code. So you
use:
Person.find_by_sql( “select name, id, body from people” );
But you lose safety (from sql injection) and simplicity of ActiveRecord.
So I wonder if there is plugin or a way so you can write the query like
this: