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

Re-implement ?sql= mode #65

simonw opened this issue Nov 12, 2017 · 1 comment

Re-implement ?sql= mode #65

simonw opened this issue Nov 12, 2017 · 1 comment


Copy link

simonw commented Nov 12, 2017

Here's the code I removed:

async def data(self, request, name, hash):
    sql = 'select * from sqlite_master'
    custom_sql = False
    params = {}
    if request.args.get('sql'):
        params = request.raw_args
        sql = params.pop('sql')
        custom_sql = True
    rows = await self.execute(name, sql, params)
    columns = [r[0] for r in rows.description]
    return {
        'database': name,
        'rows': rows,
        'columns': columns,
        'query': {
            'sql': sql,
            'params': params,
    }, {
        'database_hash': hash,
        'custom_sql': custom_sql,
@simonw simonw added this to the Ship v1 milestone Nov 12, 2017
@simonw simonw added the small label Nov 12, 2017
@simonw simonw closed this as completed in 59580d0 Nov 12, 2017
Copy link
Owner Author

simonw commented Nov 12, 2017


Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet

No branches or pull requests

1 participant