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

No way to interactively enter multiline sql statements #4

Open
ebpitts opened this issue Aug 16, 2016 · 0 comments
Open

No way to interactively enter multiline sql statements #4

ebpitts opened this issue Aug 16, 2016 · 0 comments

Comments

@ebpitts
Copy link

ebpitts commented Aug 16, 2016

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.

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

No branches or pull requests

1 participant