-
Notifications
You must be signed in to change notification settings - Fork 147
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
Make commands pluggable #114
Comments
UC1) Currently there is command
why not use something similar for dumps for instance (the only issue here as I could see is it will ask you for username/password) but it requires a jdbc driver which knows how to work with
UC2) May be I do not understand your point but currently there is such possibility to have several connections like
and to see the list of active like
also there is |
I want to fetch information from the database for the objects identified in a heapdump. So it would be nice to be able to write a single SQL that refers to both "heapdump" tables and "DB tables". |
I'm not 100% sure but it looks like moving to Jline3 and commands as widgets will allow to achieve it. It is possible to remove existing and add new (on the fly as well). Currently I try to move to Jline3 and could check if widgets help or not by the end of the week in my sandbox |
I like the idea of making commands pluggable. (I did it recently in Quidem, which is a similar tool in many respects, and was happy with the result.) I don't see a reason to couple pluggable commands from migration to jline3. Commands are more of a 'back-end' thing. |
Is jline3 welcome at all? |
Since they are decoupled they can be done in either order.
… On Aug 21, 2018, at 12:01 AM, Vladimir Sitnikov ***@***.***> wrote:
I don't see a reason to couple pluggable commands from migration to jline3
Is jline3 welcome at all?
It looks like trying jline3 first, and implementing pluggable commands later would make more sense than the other way around.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.
|
Thank you for pointing to quidem. I looked at widgets more accurate and unfortunately it looks like that they are too impecunious for this task (e.g. no completer, help text support) At the same time I did the similar to quidem way. Now it's possible to add custom commands like
or via However at the moment it does not allow to hide existing functions like
[1] master...snuyanzin:SQLLINE_114#diff-553a413667266842ab8cd7d1faadfbd8R742 |
I am not sure that two handlers with achieve my main goal with hiding commands. I think there should be an option for the user to hide commands he does not need. |
Thank you for your response. The issue (and above there was an attempt to cope with it) is to allow to hide commands but at the same time to have a limited set of commands which are not allowed to be hidden (otherwise I can not imagine how to handle situations with hidden I agree it would be better to hide by command than by command handler and did changes to make it possible (also the limitation to 2 command handlers is removed):
What is still unclear to me: is it ok to allow a user to hide any command e.g. The current version could be seen at |
I agree that we should not allow to hide all commands. Commands like quit should be always present. |
Yes that is right.
about commands which are not allowed to hide the current set is |
Let's not do the |
In this case I have a question: how to resolve situation if end-users want to "override" command (add a command handler with existing command name)? |
These "end-users" would be java programmers (since they know how to write a command handler). I claim that they are not typical end-users. We can make them write a sub-class of Application. |
ok, i understand, thank you. |
With current solution it is possible to specify one or more command handlers like
does it make sense to have possibility to specify |
Fixed in 5a6789d, PR #119. Thanks @snuyanzin! |
I'm exploring the possibility to use SQLLine for headless mode in vlsi/mat-calcite-plugin#9
The use-case there is as follows:
UC1) Start the application in command line mode, and use interactive console. In interactive mode, it would be nice to have
mat-calcite
-specific commands like!open-dump cool_dump.hprof
.The thing is
!open-dump
command does not make much sense in SQLLine withoutmat-calcite
.UC2) "human-friendly" way to configure Calcite connection. For instance: attach two heap dumps as two Calcite schemas. It might be a good idea to attach JDBC connection to yet another schema as well.
It would be nice to be able to "attach/detach" DB connections with simple
!add-connection schema_name jdbc:postgresql:...
or something like that.This is more Calcite-specific than mat-clacite-specific, however it does not look like SQLLine-specific either.
The text was updated successfully, but these errors were encountered: