Skip to content

Commit caf9103

Browse files
authored
Merge pull request #227 from EdurtIO/develop
Release 1.20.0
2 parents 8d66db8 + 12f71ee commit caf9103

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+879
-706
lines changed

.github/workflows/semgrep.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
name: Semgrep
2+
on:
3+
schedule:
4+
- cron: '0 0 * * *'
5+
jobs:
6+
semgrep:
7+
name: Scan
8+
runs-on: ubuntu-20.04
9+
env:
10+
SEMGREP_APP_TOKEN: ${{ secrets.SEMGREP_APP_TOKEN }}
11+
container:
12+
image: returntocorp/semgrep
13+
if: (github.actor != 'dependabot[bot]')
14+
steps:
15+
- uses: actions/checkout@v3
16+
- run: semgrep ci

README.md

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -84,13 +84,6 @@ DBM can query data from any SQL-speaking datastore or data engine (ClickHouse an
8484

8585
Here are some of the major database solutions that are supported:
8686

87-
<style>
88-
.a {
89-
display: inline-block;
90-
padding: 0 5px;
91-
}
92-
</style>
93-
9487
<p align="center">
9588
<img src="./src/shared/assets/integrate/clickhouse.png" alt="ClickHouse" class="a" width="133" height="34" />
9689
<img src="./src/shared/assets/integrate/trino.png" alt="Trino" class="a" width="46" height="46"/>

docs/docs/release/1.20.0-20220706.md

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
---
2+
template: overrides/main.html
3+
icon: material/gesture-tap-button
4+
---
5+
6+
DBM Version for `1.20.0` is released!
7+
8+
Release Time: `2022-07-06`
9+
10+
#### General
11+
12+
---
13+
14+
- Support custom file names for downloading result data
15+
- Add multiple editor theme
16+
17+
#### Dependencies
18+
19+
---
20+
21+
- Bump eslint-plugin-jsdoc from 35.3.2 to 39.3.3
22+
- Bump angular-highcharts from 13.0.1 to 14.1.5
23+
- Bump karma-jasmine-html-reporter from 1.7.0 to 2.0.0
24+
25+
#### MySQL
26+
27+
---
28+
29+
- Support metadata management to build data tables [issues-180](https://github.com/EdurtIO/dbm/issues/180)
30+
- Support metadata management to filter tables [issues-180](https://github.com/EdurtIO/dbm/issues/180)
31+
- Support metadata management to show database ddl [issues-180](https://github.com/EdurtIO/dbm/issues/180)
32+
- Support metadata management to delete database [issues-180](https://github.com/EdurtIO/dbm/issues/180)
33+
- Support metadata management to preview table [issues-180](https://github.com/EdurtIO/dbm/issues/180)
34+
- Support metadata management to show table ddl [issues-180](https://github.com/EdurtIO/dbm/issues/180)
35+
- Support metadata management to delete table [issues-180](https://github.com/EdurtIO/dbm/issues/180)
36+
- Support metadata management to rename table, truncate table [issues-180](https://github.com/EdurtIO/dbm/issues/180)
37+
- Support metadata management to preview column [issues-180](https://github.com/EdurtIO/dbm/issues/180)
38+
- Support metadata management to create column, delete column [issues-180](https://github.com/EdurtIO/dbm/issues/180)
39+
- Support metadata management to rename column [issues-180](https://github.com/EdurtIO/dbm/issues/180)
40+
- Support metadata management to add column comment [issues-180](https://github.com/EdurtIO/dbm/issues/180)
41+
42+
#### PostgreSQL
43+
44+
---
45+
46+
- Supports quick query
47+
- Support metadata management menu server related operations
48+
- Supports metadata management of disk usage
49+
50+
---
51+
52+
- @qianmoQ

docs/mkdocs.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ plugins:
128128
en:
129129
Home: Home
130130
Download: Get started with dbm
131-
Datasource_MySQL: MySQL (Experimental)
131+
Datasource_MySQL: MySQL
132132
Datasource_Presto_Trino: Presto & Trino (Experimental)
133133
Datasource_ClickHouse: ClickHouse
134134
Datasource_PostgreSQL: PostgreSQL (Experimental)
@@ -156,7 +156,7 @@ plugins:
156156
Datasource_PostgreSQL: PostgreSQL (Experimental)
157157
- redirects:
158158
redirect_maps:
159-
release-latest.md: release/1.19.0-20220623.md
159+
release-latest.md: release/1.20.0-20220706.md
160160

161161
nav:
162162
- Home: index.md
@@ -178,7 +178,8 @@ nav:
178178
- Mutations: reference/monitor/monitor_mutations.md
179179
- Query: reference/monitor/monitor_query.md
180180
- Release Note:
181-
- 1.19.0 (latest): release/1.19.0-20220623.md
181+
- 1.20.0 (latest): release/1.20.0-20220706.md
182+
- 1.19.0: release/1.19.0-20220623.md
182183
- 1.18.0: release/1.18.0-20220610.md
183184
- 1.17.0: release/1.17.0-20220529.md
184185
- 1.16.0: release/1.16.0-20220513.md

electron-builder.yml

Lines changed: 33 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,15 @@
11
appId: 'io.edurt.dbm'
2+
23
artifactName: ${name}-${version}-${os}-${arch}.${ext}
4+
35
productName: 'dbm'
4-
publish: { provider: github, releaseType: draft, vPrefixedTagName: true }
6+
7+
publish: {
8+
provider: github,
9+
releaseType: draft,
10+
vPrefixedTagName: true
11+
}
12+
513
forceCodeSigning: false
614

715
releaseInfo:
@@ -10,55 +18,47 @@ releaseInfo:
1018
1119
---
1220
21+
- Support custom file names for downloading result data
1322
- Add multiple editor theme
14-
- Redesign data source deletion prompt
15-
- Support metadata management to jump to the query page
16-
- Delete the domain name incubator tag
17-
- Add some trend charts and project badges
18-
- Fix that the editor cannot boot when it automatically prompts for multiple options, and the option is highlighted
19-
- Compressed and packaged binary software package
20-
21-
#### Security
22-
23-
---
24-
25-
- Upgrade angular to `14.0.1`
26-
- Upgrade electron to `16.2.0`
2723
28-
#### ClickHouse
24+
#### Dependencies
2925
3026
---
3127
32-
- Support the currently stopped running process
33-
34-
#### Trino & Presto
35-
36-
---
37-
38-
- Supports query result time and total number of data [issues-158](https://github.com/EdurtIO/dbm/issues/158)
28+
- Bump eslint-plugin-jsdoc from 35.3.2 to 39.3.3
29+
- Bump angular-highcharts from 13.0.1 to 14.1.5
30+
- Bump karma-jasmine-html-reporter from 1.7.0 to 2.0.0
3931
4032
#### MySQL
4133
4234
---
4335
44-
- Support quick query operation [issues-180](https://github.com/EdurtIO/dbm/issues/180)
45-
- Supports query result time and total number of data [issues-180](https://github.com/EdurtIO/dbm/issues/180)
46-
- Supports monitor → processors [issues-180](https://github.com/EdurtIO/dbm/issues/180)
47-
- Supports monitor → connection [issues-180](https://github.com/EdurtIO/dbm/issues/180)
48-
- Supports metadata management of disk usage [issues-180](https://github.com/EdurtIO/dbm/issues/180)
49-
- Support metadata management menu server related operations [issues-180](https://github.com/EdurtIO/dbm/issues/180)
36+
- Support metadata management to build data tables [issues-180](https://github.com/EdurtIO/dbm/issues/180)
37+
- Support metadata management to filter tables [issues-180](https://github.com/EdurtIO/dbm/issues/180)
38+
- Support metadata management to show database ddl [issues-180](https://github.com/EdurtIO/dbm/issues/180)
39+
- Support metadata management to delete database [issues-180](https://github.com/EdurtIO/dbm/issues/180)
40+
- Support metadata management to preview table [issues-180](https://github.com/EdurtIO/dbm/issues/180)
41+
- Support metadata management to show table ddl [issues-180](https://github.com/EdurtIO/dbm/issues/180)
42+
- Support metadata management to delete table [issues-180](https://github.com/EdurtIO/dbm/issues/180)
43+
- Support metadata management to rename table, truncate table [issues-180](https://github.com/EdurtIO/dbm/issues/180)
44+
- Support metadata management to preview column [issues-180](https://github.com/EdurtIO/dbm/issues/180)
45+
- Support metadata management to create column, delete column [issues-180](https://github.com/EdurtIO/dbm/issues/180)
46+
- Support metadata management to rename column [issues-180](https://github.com/EdurtIO/dbm/issues/180)
47+
- Support metadata management to add column comment [issues-180](https://github.com/EdurtIO/dbm/issues/180)
5048
5149
#### PostgreSQL
5250
5351
---
5452
55-
- Support PostgreSQL (custom query and data source management)
56-
- Add PostgreSQL docs
53+
- Supports quick query
54+
- Support metadata management menu server related operations
55+
- Supports metadata management of disk usage
5756
5857
directories:
5958
output: ./release
59+
6060
files:
61-
# - '**/*'
61+
# - '**/*'
6262
- '!**/*.ts'
6363
- '!scripts'
6464
- '!src'
@@ -68,7 +68,9 @@ files:
6868
- '!.github'
6969
- '!.vscode'
7070
- 'dist'
71+
7172
compression: normal
73+
7274
asar: false
7375

7476
mac:

package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "dbm",
3-
"version": "1.19.0",
3+
"version": "1.20.0",
44
"author": "qianmoQ <shicheng@ttxit.com>",
55
"description": "DataBase GUI",
66
"github": "https://github.com/EdurtIO/dbm.git",
@@ -54,7 +54,7 @@
5454
"@dalongrong/presto-client": "^0.6.5",
5555
"@ngx-translate/core": "^14.0.0",
5656
"@ngx-translate/http-loader": "^7.0.0",
57-
"angular-highcharts": "^13.0.1",
57+
"angular-highcharts": "^14.1.5",
5858
"codemirror": "^5.64.0",
5959
"conventional-changelog-cli": "^2.1.1",
6060
"css-loader": "^6.7.1",
@@ -109,14 +109,14 @@
109109
"electron-reload": "1.5.0",
110110
"eslint": "7.29.0",
111111
"eslint-plugin-import": "2.23.4",
112-
"eslint-plugin-jsdoc": "35.3.2",
112+
"eslint-plugin-jsdoc": "^39.3.3",
113113
"eslint-plugin-prefer-arrow": "1.2.3",
114114
"jasmine-core": "~3.7.0",
115115
"karma": "~6.3.0",
116116
"karma-chrome-launcher": "~3.1.0",
117117
"karma-coverage": "~2.0.3",
118118
"karma-jasmine": "~5.0.1",
119-
"karma-jasmine-html-reporter": "^1.5.0",
119+
"karma-jasmine-html-reporter": "^2.0.0",
120120
"ts-loader": "^9.2.3",
121121
"typescript": "^4.2.4",
122122
"wait-on": "^5.3.0",

src/renderer/app/pages/management/metadata/metadata.component.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,10 +56,7 @@ export class MetadataComponent extends BaseComponent implements OnInit {
5656
configModel.title = k.alias;
5757
configModel.type = TypeEnum.disk;
5858
configModel.disabled = k.status ? false : true;
59-
if (k.type === DatabaseEnum.postgresql) {
60-
configModel.disabled = true;
61-
}
62-
if (k.type === DatabaseEnum.presto || k.type === DatabaseEnum.trino) {
59+
if (k.type === DatabaseEnum.presto || k.type === DatabaseEnum.trino || k.type === DatabaseEnum.postgresql) {
6360
configModel.isLeaf = true;
6461
}
6562
if (configModel.disabled) {

src/renderer/assets/i18n/en.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,8 @@
167167
"reset": "Reset",
168168
"mysql": "MySQL",
169169
"postgresql": "PostgreSQL",
170-
"stop": "Stop"
170+
"stop": "Stop",
171+
"location": "Location"
171172
},
172173
"language": {
173174
"english": "English",
@@ -233,7 +234,8 @@
233234
"jdbc": "Allows ClickHouse to connect to external databases via JDBC",
234235
"sqlite": "The engine allows to import and export data to SQLite and supports queries to SQLite tables directly from ClickHouse.",
235236
"odbc": "Allows ClickHouse to connect to external databases via ODBC",
236-
"mongodb": "MongoDB engine is read-only table engine which allows to read data (SELECT queries) from remote MongoDB collection. Engine supports only non-nested data types. INSERT queries are not supported."
237+
"mongodb": "MongoDB engine is read-only table engine which allows to read data (SELECT queries) from remote MongoDB collection. Engine supports only non-nested data types. INSERT queries are not supported.",
238+
"default": "Default table engine"
237239
},
238240
"property": {
239241
"timeSeconds": "Retention time in RAM (unit per second)",

src/renderer/assets/i18n/zh.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,8 @@
166166
"reset": "重置",
167167
"mysql": "MySQL",
168168
"postgresql": "PostgreSQL",
169-
"stop": "停止"
169+
"stop": "停止",
170+
"location": "位置"
170171
},
171172
"language": {
172173
"english": "英语",
@@ -234,7 +235,8 @@
234235
"jdbc": "允许ClickHouse通过JDBC连接到外部数据库",
235236
"sqlite": "The engine allows to import and export data to SQLite and supports queries to SQLite tables directly from ClickHouse.",
236237
"odbc": "Allows ClickHouse to connect to external databases via ODBC",
237-
"mongodb": "MongoDB engine is read-only table engine which allows to read data (SELECT queries) from remote MongoDB collection. Engine supports only non-nested data types. INSERT queries are not supported."
238+
"mongodb": "MongoDB engine is read-only table engine which allows to read data (SELECT queries) from remote MongoDB collection. Engine supports only non-nested data types. INSERT queries are not supported.",
239+
"default": "默认表引擎"
238240
},
239241
"property": {
240242
"timeSeconds": "Retention time in RAM (unit per second)",

src/renderer/components/column/comment/column.comment.component.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ export class CommentColumnComponent extends BaseComponent implements AfterViewIn
2121
database: string;
2222
@Input()
2323
table: string;
24+
@Input()
25+
originColumnType: string;
2426
@Output()
2527
emitter = new EventEmitter<ConfigModel>();
2628
inputValue: string;
@@ -47,7 +49,7 @@ export class CommentColumnComponent extends BaseComponent implements AfterViewIn
4749
_value.database = this.database;
4850
_value.table = this.table;
4951
_value.name = this.value;
50-
this.columnService.comment(request, _value, this.inputValue).then(response => {
52+
this.columnService.comment(request, _value, this.inputValue, this.originColumnType).then(response => {
5153
if (response.status) {
5254
this.messageService.success(response.message);
5355
this.config.status = false;

src/renderer/components/column/common/common.column.component.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,15 @@
1010
</app-component-delete-column>
1111
<app-component-rename-column *ngIf="menu.command === operation.rename" [config]=" config"
1212
[value]="value?.origin?.key" [database]="database" [table]="table"
13-
(emitter)="handlerEmitter($event)">
13+
[originColumnType]="value?.origin?.value" (emitter)="handlerEmitter($event)">
1414
</app-component-rename-column>
1515
<app-component-create-column *ngIf="menu.command === operation.create" [config]="config"
1616
[value]="value?.origin?.key" [database]="database" [table]="table"
1717
(emitter)="handlerEmitter($event)">
1818
</app-component-create-column>
1919
<app-component-comment-column *ngIf="menu.command === operation.comment" [config]="config"
2020
[value]="value?.origin?.key" [database]="database" [table]="table"
21-
(emitter)="handlerEmitter($event)">
21+
[originColumnType]="value?.origin?.value" (emitter)="handlerEmitter($event)">
2222
</app-component-comment-column>
2323
</div>
2424
</nz-modal>

src/renderer/components/column/rename/column.rename.component.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ export class RenameColumnComponent extends BaseComponent {
2121
database: string;
2222
@Input()
2323
table: string;
24+
@Input()
25+
originColumnType: string;
2426
@Output()
2527
emitter = new EventEmitter<any>();
2628
inputValue: string;
@@ -47,7 +49,7 @@ export class RenameColumnComponent extends BaseComponent {
4749
_value.database = this.database;
4850
_value.table = this.table;
4951
_value.name = this.value;
50-
this.columnService.rename(request, _value, this.inputValue).then(response => {
52+
this.columnService.rename(request, _value, this.inputValue, this.originColumnType).then(response => {
5153
if (response.status) {
5254
this.messageService.success(response.message);
5355
this.emitter.emit(true);

src/renderer/components/database/structure/database.structure.component.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import { ClipboardComService } from '@renderer/services/other/clipboard.service'
99
import { EditorService } from '@renderer/services/editor/editor.service';
1010
import { SystemEditorModel } from '@renderer/model/system.model';
1111
import { SqlUtils } from '@renderer/utils/sql.utils';
12+
import { DatabaseEnum } from "@renderer/enum/database.enum";
1213

1314
@Component({
1415
selector: 'app-component-database-structure',
@@ -54,7 +55,11 @@ export class DatabaseStructureComponent extends BaseComponent implements AfterVi
5455
request.config = await this.dataSourceService.getByAliasAsync(this.config.value);
5556
this.metadataService.getDatabaseDDL(request, this.value).then(response => {
5657
if (response.status) {
57-
this.structure = response?.data?.columns[0]?.statement;
58+
if (request.config.type === DatabaseEnum.mysql) {
59+
this.structure = response?.data?.columns[0]?.['Create Database'];
60+
} else {
61+
this.structure = response?.data?.columns[0]?.statement;
62+
}
5863
} else {
5964
this.messageService.error(response.message);
6065
}

src/renderer/components/query/quick/quick.query.component.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,11 @@ export class QuickQueryComponent extends BaseComponent {
6767
} else {
6868
this.spanSize = 8;
6969
}
70+
71+
if (request.config.type === DatabaseEnum.postgresql) {
72+
request.config.database = this.database;
73+
}
74+
7075
switch (quick) {
7176
case QuickEnum.database:
7277
this.disabled.dialog = true;

0 commit comments

Comments
 (0)