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

Feature: Remember previously used NS and DB #35 #1311

Closed
wants to merge 1 commit into from

Conversation

AL1L
Copy link
Contributor

@AL1L AL1L commented Oct 4, 2022

Thank you for submitting this pull request! We appreciate you spending the time to work on these changes.

What is the motivation?

Issue #35

What does this change do?

Parses the query before sending it to the server then upon successful response, extract the USE statements from the query and apply the DB and NS if they were updated.

What is your testing strategy?

Added a print line to print out the namespace and database used before each request, used the USE statement and observed the change. Removed the print line.

Is this related to any issues?

Fixes #35

Have you read the Contributing Guidelines?

@tobiemh
Copy link
Member

tobiemh commented Oct 4, 2022

Hey @AL1L this is awesome, although the reason that this hasn't been implemented yet is that the sql REPL should really connect over WebSocket (waiting for the Rust client library for that), and that will therefore lead to the possibility to store params across queries.

I'll keep this PR open for the time being while we wait for the Rust client, and then we can come back to this at that point.

@AL1L
Copy link
Contributor Author

AL1L commented Oct 4, 2022

Yeah, I saw that in another PR and I thought I'd just send this one as an interim solution as it wasn't too difficult.

@ansarizafar
Copy link

Repl prompt should show the currently used NS and DB
namespace.database>
OR
namespace/database>

@tobiemh
Copy link
Member

tobiemh commented Dec 30, 2022

Hi @AL1L I'm going to close this pull request, because we will soon be changing to the WebSocket implementation instead of an HTTP connection, which will solve this issue, and a number of other issues too!

@tobiemh tobiemh closed this Dec 30, 2022
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

Successfully merging this pull request may close these issues.

Feature: Remember previously specified NS and DB in command-line REPL
3 participants