-
Notifications
You must be signed in to change notification settings - Fork 24
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
SqlLine integration #17
base: main
Are you sure you want to change the base?
Conversation
The issue which I currently faced is that it looks like jna/jansi could not handle ctrl-c correctly in eclipse env... It leads to endless loop. |
8eeca25
to
b052c4e
Compare
I tried with MAT 1.10.0 + Sqlline 1.9.0 + macOS, and it seems to work (including ctrl+c) |
import java.util.Set; | ||
|
||
public class MCPApplication extends Application { | ||
private static final Set<String> ALLOWED_SQLLINE_COMMANDS = new HashSet<String>() {{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@snuyanzin , I might be late here :) Do you remember by chance why do you limit the set of commands?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As far as I remember there are database specific commands e.g. !isolation
, !drop
and etc.
The idea was to limit to set of commands which makes sense for mat-calcite-plugin.
Agree that the list of commands itself is the subject for discussion.
just checked: for me it is still reproducing. It seems Linux specific. Based on trace jline3 uses System specific pty (in my case LinuxNativePty). I suppose that could be a reason why on macOS it could work
|
The PR suggests initial integration with SqlLine mentioned at #9.
Some sqlline commands are hidden, especially for mat-calcite-plugin there is added
!open_dump
Short demo how it currently looks like https://asciinema.org/a/251789, https://asciinema.org/a/251617
Startup:
./MemoryAnalyzer -application MatCalcitePlugin.execute sqlline