Skip to content
This repository has been archived by the owner on Mar 12, 2023. It is now read-only.

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

Open
ADTC opened this issue Jul 4, 2021 · 0 comments
Labels
enhancement New feature or request

Comments

@ADTC
Copy link

ADTC commented Jul 4, 2021

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 ADTC added the enhancement New feature or request label Jul 4, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant