【DBeaver】Common custom settings

background

Because some students sincerely registered Navicat with their company information and real names, the company received a lawyer’s letter from Navicat when the trial ended and they were strictly prohibited from using Navicat, so they changed to DBeaver (version 22.3.4, which has been updated to version 23.0.0) .
This article first records how to set the font of DBeaver, and will gradually improve it when encountering problems in subsequent use.

1. User interface settings

Unlike most software main menu settings - preferences, DBeaver's is hidden deep enough in the drop-down首选项 menu窗口

Version 1.1, 22.3.4

1.1.1, SQL editor - font setting

Menu entry: 窗口| 首选项| 用户界面| 外观| 颜色和字体| 基本| 文本字体
As shown below:
Font settings in the SQL editor

1.1.2. Query result - font setting

Menu entry: 窗口| 首选项| 用户界面| | 外观| 颜色和字体|SQL编辑器SQL输出字体
Query result font setting

1.2, 23.0.0 version

Due to special reasons, the computer grid was reinstalled, and the latest 23.0.3version was downloaded, and the font settings were found to have changed. The official website explained
insert image description here

1.2.1. Apply fonts (navigation bar, etc.)

Menu entry: 窗口| 首选项| 用户界面| | 外观|DBeaver FontsMain font
insert image description here

1.2.2. Text font (SQL output, text editor, etc.)

Menu entry: 窗口| 首选项| 用户界面| | 外观|DBeaver FontsMonospace font
insert image description here

2. General settings

2.1. Connection type setting/environment setting

You can set the connection type in the database connection, or the environment type, development, testing, production. The
new connection settings are as follows:
![Insert picture description here](https://img-blog.csdnimg.cn/436f60d87aa445718501f372106c2ea5.png
edit the connection settings as follows:
insert image description here
insert image description here

According to the background color of the window , you can know whether the currently connected database is 开发or the environment测试生产

For production environments, all write operations must谨慎!谨慎!谨慎!

Effect:
default, as shown above, the orange environment background is the production environment, the green below is the test environment, and the white is the development environmentinsert image description here

3. Editor settings

Menu entry: 窗口| 首选项|编辑器

3.1, SQL formatting settings

The default code formatting does not conform to personal habits. If you want to customize personalized SQL formatting rules, you can achieve it through the following methods, which are similar to IDEA's code style settings. You can customize the formatting layout, keyword case, indentation, etc.

窗口 | 首选项 | 编辑器 | SQL编辑器 | SQL格式化
insert image description here

3.2, code completion settings

窗口| 首选项| 编辑器| SQL编辑器| 代码补全
If you want to customize the code completion settings, you can handle it here, such as automatically generating table aliases, etc.

Table alias settings:insert image description here

3.3, statement delimiter (distinguish multiple SQL)

窗口| 首选项| 编辑器| SQL编辑器| SQL处理
The default statement delimiter ;, but the default strategy is checked 空行是语句分隔符, which will result in a SQL with a blank line in the middle will be considered as multiple SQL, and only the statement before the blank line will be executed, resulting in SQL syntax errors, or executed The where conditions are not equal.
According to my operating habits, it is 建议取消勾选 空行是语句分隔符
insert image description here
an example:

  1. Check 空行是语句分隔符
    the cursor position to directly execute SQL
    insert image description here

insert image description here
Select SQL execution
insert image description here

  1. Uncheck 空行是语句分隔符
    Uncheck the blank line is the statement delimiter, SQL is executed normally
    insert image description here

Guess you like

Origin blog.csdn.net/weixin_43582081/article/details/129061679