-
Notifications
You must be signed in to change notification settings - Fork 68
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
Shell: Support for WITH clauses (or more complex queries) #239
Comments
Of course there's |
Transactions at a query level might be useful at some point (BEGIN, COMMIT, ROLLBACK). There is |
Every query performed with the shell is also wrapped in a transaction right now, that's something that's also unwanted in many cases, we could add a startup option to disable that behavior. |
VACUUM is currently not supported, see canonical/dqlite#435 (comment) |
Presumably INSERT would be very useful, and UPDATE on a live system when you need to correct bad data. |
Ideally we'd avoid this kind of ad-hoc parsing of the SQL string entirely in go-dqlite and let the dqlite server take care of it. Since canonical/dqlite#477 dqlite's QUERY_SQL request can accomodate SQL strings that modify the database, which makes that potentially achievable. |
+1 The shell should only use As long as things like Bonus points for fixing |
The shell only supports queries that start with SELECT statements:
go-dqlite/internal/shell/shell.go
Lines 88 to 92 in 251e831
Other queries can be made that don't start with a SELECT. It would be advantageous to add those to the shell. With dqlite being rolled out into production for Juju relatively soon, we're using the shell to inspect or remedy potential problems in the field. So using more of the sqlite SQL standard would be a good move forward.
The text was updated successfully, but these errors were encountered: