Skip to content

No way to interactively enter multiline sql statements #4

@ebpitts

Description

@ebpitts

Start aq and try entering the first example

> SELECT instance_type, count(*) count
QueryError: no such column: instance_type

aq treats the newline as the statement terminator and tries to run the query immediately.

How about using a semicolon as the statement terminator? This is what people will be used to from other SQl repls like mysql or psql.

The behavior I would expect is

 > SELECT count(*) from ec2_instances
->

Does not execute, waits for ;

 > SELECT count(*) from ec2_instances
-> ;

or

 > SELECT count(*) from ec2_instances;

Executes.

For bonus points

 > SELECT count(*) from ec2_instances; SELECT count(*) from ec2_images;

could execute two queries.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions