Change database and schema with code
已回答
We have many connections and databases, and I'm writing a Pycharm plugin (using IDEA), which opens SQL files related to a specific connection.
I do it by creating a virtual file: LocalFileSystem.getInstance().refreshAndFindFileByPath(path_to_sql_script).
And open it:
FileEditorManager.getInstance(project).open(...)
And it works nicely, but I need to be able to change the selected database and schema. Is it possible?
请先登录再写评论。
Anyone?
The steps are the same as in the previous instruction, however, instead of
com.intellij.database.datagrid.DataRequest.RawRequest, need to usecom.intellij.database.datagrid.DataRequest.SchemaSwitchRequestRef: https://intellij-support.jetbrains.com/hc/en-us/community/posts/4408616634770/comments/4408886929682