Kusto.Explorer 代码功能

与其他 IDE 类似,Kusto.Explorer 提供各种代码功能,包括代码重构代码导航代码分析器实用工具。

代码重构

使用 Kusto.Explorer 的 KQL 查询编辑和重构功能可以重命名变量和列名称,并可以将标量和表格语句提取为 let 表达式。

变量名或列名重命名

可通过在查询编辑器窗口中单击 Ctrl+R 来重命名所选符号。

Animated GIF that shows a variable being renamed in the Query Editor window. Three occurrences are simultaneously replaced with the new name.

将标量作为 let 表达式提取

若要将所选文本定义为 let 表达式,请按 Alt+Ctrl+M

Animated GIF. The Query Editor pointer starts on a literal expression. A let statement then appears that sets that literal value to a new variable.

将表格语句提取为 let 表达式

若要将表格表达式定义为 let 语句,请选择文本,然后按 Alt+Ctrl+M

Animated GIF. A tabular expression is selected in the Query Editor. A let statement then appears that sets that tabular expression to a new variable.

代码导航

Kusto 提供了若干功能,通过使用查询符号信息轻松进行代码导航。

转到符号定义

可以使用 F12Alt+Home 快捷方式导航到当前符号的定义。

列出符号的所有引用

可以使用 Ctrl+F12 快捷方式获取当前符号的所有引用。

References of a symbol Kusto Explorer Code Navigation.

有关 Kusto.Explorer 中的键盘快捷方式的详细信息,请参阅键盘快捷方式

代码分析器

使用 Kusto.Explorer 的代码分析器实用工具可以自动分析当前查询并输出一组适用的改进建议。

若要查看改进建议,请选择结果网格底部的“问题”选项卡。

Code analyzer GIF in Kusto Explorer.