ruby_jard icon indicating copy to clipboard operation
ruby_jard copied to clipboard

Keyword to output the underlying SQL query of Active Record relation to the console

Open ADTC opened this issue 4 years ago • 0 comments

Is your feature request related to a problem? Please describe. I want to output the underlying SQL query of an Active Record relation in a Rails project. I want this output to be shown in the console.

Describe the solution you'd like Have a keyword that has the ability to always output the underlying SQL query of an Active Record in full to the console for copying purposes. It should be executable in a database query program. This should work even if the records are in memory.

Describe alternatives you've considered Variables section of the GUI. It shows the SQL query if the records are not in memory yet. However, it truncates the query. Also, once the records are in memory, the query is no longer shown. Moreover, if the list of variables is too long, some variables are not shown on screen.

ADTC avatar Jul 04 '21 05:07 ADTC