Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Example queries should use column names, not select * #105

Closed
simonw opened this issue May 11, 2021 · 1 comment
Closed

Example queries should use column names, not select * #105

simonw opened this issue May 11, 2021 · 1 comment
Labels
enhancement New feature or request
Milestone

Comments

@simonw
Copy link
Owner

simonw commented May 11, 2021

Because otherwise you get errors if you don't have permission to access all columns (e.g. the password column on auth_user) - see #98 (comment)

@simonw simonw added the enhancement New feature or request label May 11, 2021
@simonw
Copy link
Owner Author

simonw commented May 11, 2021

Those queries are generated in the template here:

<li style="break-inside: avoid;"><a href="?sql={% filter sign_sql|urlencode %}select count(*) from {{ table.name }}{% endfilter %}&sql={% filter sign_sql|urlencode %}select * from {{ table.name }}{% endfilter %}">{{ table.name }}</a>

Wrapped version:

<li style="break-inside: avoid;"><a href="?sql={% filter sign_sql|urlencode %}select count(*) from {{ table.name }}{% endfilter %}&sql={% filter sign_sql|urlencode %}select * from {{ table.name }}{% endfilter %}">{{ table.name }}</a>

@simonw simonw closed this as completed in f2c163b May 16, 2021
@simonw simonw added this to the 0.14 milestone May 16, 2021
simonw added a commit that referenced this issue May 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant