Article directory
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:
1.1.2. Query result - font setting
Menu entry: 窗口
| 首选项
| 用户界面
| | 外观
| 颜色和字体
|SQL编辑器
SQL输出字体
1.2, 23.0.0 version
Due to special reasons, the computer grid was reinstalled, and the latest 23.0.3
version was downloaded, and the font settings were found to have changed. The official website explained
1.2.1. Apply fonts (navigation bar, etc.)
Menu entry: 窗口
| 首选项
| 用户界面
| | 外观
|DBeaver Fonts
Main font
1.2.2. Text font (SQL output, text editor, etc.)
Menu entry: 窗口
| 首选项
| 用户界面
| | 外观
|DBeaver Fonts
Monospace font
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:
edit the connection settings as follows:
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 environment
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格式化
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:
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 建议取消勾选
空行是语句分隔符
an example:
- Check
空行是语句分隔符
the cursor position to directly execute SQL
Select SQL execution
- Uncheck
空行是语句分隔符
Uncheck the blank line is the statement delimiter, SQL is executed normally