Skip to content

Commit

Permalink
Merge pull request #227 from EdurtIO/develop
Browse files Browse the repository at this point in the history
Release 1.20.0
  • Loading branch information
qianmoQ committed Jul 5, 2022
2 parents 8d66db8 + 12f71ee commit caf9103
Show file tree
Hide file tree
Showing 41 changed files with 879 additions and 706 deletions.
16 changes: 16 additions & 0 deletions .github/workflows/semgrep.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: Semgrep
on:
schedule:
- cron: '0 0 * * *'
jobs:
semgrep:
name: Scan
runs-on: ubuntu-20.04
env:
SEMGREP_APP_TOKEN: ${{ secrets.SEMGREP_APP_TOKEN }}
container:
image: returntocorp/semgrep
if: (github.actor != 'dependabot[bot]')
steps:
- uses: actions/checkout@v3
- run: semgrep ci
7 changes: 0 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,13 +84,6 @@ DBM can query data from any SQL-speaking datastore or data engine (ClickHouse an

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

<style>
.a {
display: inline-block;
padding: 0 5px;
}
</style>

<p align="center">
<img src="./src/shared/assets/integrate/clickhouse.png" alt="ClickHouse" class="a" width="133" height="34" />
<img src="./src/shared/assets/integrate/trino.png" alt="Trino" class="a" width="46" height="46"/>
Expand Down
52 changes: 52 additions & 0 deletions docs/docs/release/1.20.0-20220706.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
---
template: overrides/main.html
icon: material/gesture-tap-button
---

DBM Version for `1.20.0` is released!

Release Time: `2022-07-06`

#### General

---

- Support custom file names for downloading result data
- Add multiple editor theme

#### Dependencies

---

- Bump eslint-plugin-jsdoc from 35.3.2 to 39.3.3
- Bump angular-highcharts from 13.0.1 to 14.1.5
- Bump karma-jasmine-html-reporter from 1.7.0 to 2.0.0

#### MySQL

---

- Support metadata management to build data tables [issues-180](https://github.com/EdurtIO/dbm/issues/180)
- Support metadata management to filter tables [issues-180](https://github.com/EdurtIO/dbm/issues/180)
- Support metadata management to show database ddl [issues-180](https://github.com/EdurtIO/dbm/issues/180)
- Support metadata management to delete database [issues-180](https://github.com/EdurtIO/dbm/issues/180)
- Support metadata management to preview table [issues-180](https://github.com/EdurtIO/dbm/issues/180)
- Support metadata management to show table ddl [issues-180](https://github.com/EdurtIO/dbm/issues/180)
- Support metadata management to delete table [issues-180](https://github.com/EdurtIO/dbm/issues/180)
- Support metadata management to rename table, truncate table [issues-180](https://github.com/EdurtIO/dbm/issues/180)
- Support metadata management to preview column [issues-180](https://github.com/EdurtIO/dbm/issues/180)
- Support metadata management to create column, delete column [issues-180](https://github.com/EdurtIO/dbm/issues/180)
- Support metadata management to rename column [issues-180](https://github.com/EdurtIO/dbm/issues/180)
- Support metadata management to add column comment [issues-180](https://github.com/EdurtIO/dbm/issues/180)

#### PostgreSQL

---

- Supports quick query
- Support metadata management menu server related operations
- Supports metadata management of disk usage

---

- @qianmoQ
7 changes: 4 additions & 3 deletions docs/mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ plugins:
en:
Home: Home
Download: Get started with dbm
Datasource_MySQL: MySQL (Experimental)
Datasource_MySQL: MySQL
Datasource_Presto_Trino: Presto & Trino (Experimental)
Datasource_ClickHouse: ClickHouse
Datasource_PostgreSQL: PostgreSQL (Experimental)
Expand Down Expand Up @@ -156,7 +156,7 @@ plugins:
Datasource_PostgreSQL: PostgreSQL (Experimental)
- redirects:
redirect_maps:
release-latest.md: release/1.19.0-20220623.md
release-latest.md: release/1.20.0-20220706.md

nav:
- Home: index.md
Expand All @@ -178,7 +178,8 @@ nav:
- Mutations: reference/monitor/monitor_mutations.md
- Query: reference/monitor/monitor_query.md
- Release Note:
- 1.19.0 (latest): release/1.19.0-20220623.md
- 1.20.0 (latest): release/1.20.0-20220706.md
- 1.19.0: release/1.19.0-20220623.md
- 1.18.0: release/1.18.0-20220610.md
- 1.17.0: release/1.17.0-20220529.md
- 1.16.0: release/1.16.0-20220513.md
Expand Down
64 changes: 33 additions & 31 deletions electron-builder.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,15 @@
appId: 'io.edurt.dbm'

artifactName: ${name}-${version}-${os}-${arch}.${ext}

productName: 'dbm'
publish: { provider: github, releaseType: draft, vPrefixedTagName: true }

publish: {
provider: github,
releaseType: draft,
vPrefixedTagName: true
}

forceCodeSigning: false

releaseInfo:
Expand All @@ -10,55 +18,47 @@ releaseInfo:
---
- Support custom file names for downloading result data
- Add multiple editor theme
- Redesign data source deletion prompt
- Support metadata management to jump to the query page
- Delete the domain name incubator tag
- Add some trend charts and project badges
- Fix that the editor cannot boot when it automatically prompts for multiple options, and the option is highlighted
- Compressed and packaged binary software package
#### Security
---
- Upgrade angular to `14.0.1`
- Upgrade electron to `16.2.0`
#### ClickHouse
#### Dependencies
---
- Support the currently stopped running process
#### Trino & Presto
---
- Supports query result time and total number of data [issues-158](https://github.com/EdurtIO/dbm/issues/158)
- Bump eslint-plugin-jsdoc from 35.3.2 to 39.3.3
- Bump angular-highcharts from 13.0.1 to 14.1.5
- Bump karma-jasmine-html-reporter from 1.7.0 to 2.0.0
#### MySQL
---
- Support quick query operation [issues-180](https://github.com/EdurtIO/dbm/issues/180)
- Supports query result time and total number of data [issues-180](https://github.com/EdurtIO/dbm/issues/180)
- Supports monitor → processors [issues-180](https://github.com/EdurtIO/dbm/issues/180)
- Supports monitor → connection [issues-180](https://github.com/EdurtIO/dbm/issues/180)
- Supports metadata management of disk usage [issues-180](https://github.com/EdurtIO/dbm/issues/180)
- Support metadata management menu server related operations [issues-180](https://github.com/EdurtIO/dbm/issues/180)
- Support metadata management to build data tables [issues-180](https://github.com/EdurtIO/dbm/issues/180)
- Support metadata management to filter tables [issues-180](https://github.com/EdurtIO/dbm/issues/180)
- Support metadata management to show database ddl [issues-180](https://github.com/EdurtIO/dbm/issues/180)
- Support metadata management to delete database [issues-180](https://github.com/EdurtIO/dbm/issues/180)
- Support metadata management to preview table [issues-180](https://github.com/EdurtIO/dbm/issues/180)
- Support metadata management to show table ddl [issues-180](https://github.com/EdurtIO/dbm/issues/180)
- Support metadata management to delete table [issues-180](https://github.com/EdurtIO/dbm/issues/180)
- Support metadata management to rename table, truncate table [issues-180](https://github.com/EdurtIO/dbm/issues/180)
- Support metadata management to preview column [issues-180](https://github.com/EdurtIO/dbm/issues/180)
- Support metadata management to create column, delete column [issues-180](https://github.com/EdurtIO/dbm/issues/180)
- Support metadata management to rename column [issues-180](https://github.com/EdurtIO/dbm/issues/180)
- Support metadata management to add column comment [issues-180](https://github.com/EdurtIO/dbm/issues/180)
#### PostgreSQL
---
- Support PostgreSQL (custom query and data source management)
- Add PostgreSQL docs
- Supports quick query
- Support metadata management menu server related operations
- Supports metadata management of disk usage
directories:
output: ./release

files:
# - '**/*'
# - '**/*'
- '!**/*.ts'
- '!scripts'
- '!src'
Expand All @@ -68,7 +68,9 @@ files:
- '!.github'
- '!.vscode'
- 'dist'

compression: normal

asar: false

mac:
Expand Down
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "dbm",
"version": "1.19.0",
"version": "1.20.0",
"author": "qianmoQ <shicheng@ttxit.com>",
"description": "DataBase GUI",
"github": "https://github.com/EdurtIO/dbm.git",
Expand Down Expand Up @@ -54,7 +54,7 @@
"@dalongrong/presto-client": "^0.6.5",
"@ngx-translate/core": "^14.0.0",
"@ngx-translate/http-loader": "^7.0.0",
"angular-highcharts": "^13.0.1",
"angular-highcharts": "^14.1.5",
"codemirror": "^5.64.0",
"conventional-changelog-cli": "^2.1.1",
"css-loader": "^6.7.1",
Expand Down Expand Up @@ -109,14 +109,14 @@
"electron-reload": "1.5.0",
"eslint": "7.29.0",
"eslint-plugin-import": "2.23.4",
"eslint-plugin-jsdoc": "35.3.2",
"eslint-plugin-jsdoc": "^39.3.3",
"eslint-plugin-prefer-arrow": "1.2.3",
"jasmine-core": "~3.7.0",
"karma": "~6.3.0",
"karma-chrome-launcher": "~3.1.0",
"karma-coverage": "~2.0.3",
"karma-jasmine": "~5.0.1",
"karma-jasmine-html-reporter": "^1.5.0",
"karma-jasmine-html-reporter": "^2.0.0",
"ts-loader": "^9.2.3",
"typescript": "^4.2.4",
"wait-on": "^5.3.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,7 @@ export class MetadataComponent extends BaseComponent implements OnInit {
configModel.title = k.alias;
configModel.type = TypeEnum.disk;
configModel.disabled = k.status ? false : true;
if (k.type === DatabaseEnum.postgresql) {
configModel.disabled = true;
}
if (k.type === DatabaseEnum.presto || k.type === DatabaseEnum.trino) {
if (k.type === DatabaseEnum.presto || k.type === DatabaseEnum.trino || k.type === DatabaseEnum.postgresql) {
configModel.isLeaf = true;
}
if (configModel.disabled) {
Expand Down
6 changes: 4 additions & 2 deletions src/renderer/assets/i18n/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,8 @@
"reset": "Reset",
"mysql": "MySQL",
"postgresql": "PostgreSQL",
"stop": "Stop"
"stop": "Stop",
"location": "Location"
},
"language": {
"english": "English",
Expand Down Expand Up @@ -233,7 +234,8 @@
"jdbc": "Allows ClickHouse to connect to external databases via JDBC",
"sqlite": "The engine allows to import and export data to SQLite and supports queries to SQLite tables directly from ClickHouse.",
"odbc": "Allows ClickHouse to connect to external databases via ODBC",
"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."
"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.",
"default": "Default table engine"
},
"property": {
"timeSeconds": "Retention time in RAM (unit per second)",
Expand Down
6 changes: 4 additions & 2 deletions src/renderer/assets/i18n/zh.json
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,8 @@
"reset": "重置",
"mysql": "MySQL",
"postgresql": "PostgreSQL",
"stop": "停止"
"stop": "停止",
"location": "位置"
},
"language": {
"english": "英语",
Expand Down Expand Up @@ -234,7 +235,8 @@
"jdbc": "允许ClickHouse通过JDBC连接到外部数据库",
"sqlite": "The engine allows to import and export data to SQLite and supports queries to SQLite tables directly from ClickHouse.",
"odbc": "Allows ClickHouse to connect to external databases via ODBC",
"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."
"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.",
"default": "默认表引擎"
},
"property": {
"timeSeconds": "Retention time in RAM (unit per second)",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ export class CommentColumnComponent extends BaseComponent implements AfterViewIn
database: string;
@Input()
table: string;
@Input()
originColumnType: string;
@Output()
emitter = new EventEmitter<ConfigModel>();
inputValue: string;
Expand All @@ -47,7 +49,7 @@ export class CommentColumnComponent extends BaseComponent implements AfterViewIn
_value.database = this.database;
_value.table = this.table;
_value.name = this.value;
this.columnService.comment(request, _value, this.inputValue).then(response => {
this.columnService.comment(request, _value, this.inputValue, this.originColumnType).then(response => {
if (response.status) {
this.messageService.success(response.message);
this.config.status = false;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@
</app-component-delete-column>
<app-component-rename-column *ngIf="menu.command === operation.rename" [config]=" config"
[value]="value?.origin?.key" [database]="database" [table]="table"
(emitter)="handlerEmitter($event)">
[originColumnType]="value?.origin?.value" (emitter)="handlerEmitter($event)">
</app-component-rename-column>
<app-component-create-column *ngIf="menu.command === operation.create" [config]="config"
[value]="value?.origin?.key" [database]="database" [table]="table"
(emitter)="handlerEmitter($event)">
</app-component-create-column>
<app-component-comment-column *ngIf="menu.command === operation.comment" [config]="config"
[value]="value?.origin?.key" [database]="database" [table]="table"
(emitter)="handlerEmitter($event)">
[originColumnType]="value?.origin?.value" (emitter)="handlerEmitter($event)">
</app-component-comment-column>
</div>
</nz-modal>
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ export class RenameColumnComponent extends BaseComponent {
database: string;
@Input()
table: string;
@Input()
originColumnType: string;
@Output()
emitter = new EventEmitter<any>();
inputValue: string;
Expand All @@ -47,7 +49,7 @@ export class RenameColumnComponent extends BaseComponent {
_value.database = this.database;
_value.table = this.table;
_value.name = this.value;
this.columnService.rename(request, _value, this.inputValue).then(response => {
this.columnService.rename(request, _value, this.inputValue, this.originColumnType).then(response => {
if (response.status) {
this.messageService.success(response.message);
this.emitter.emit(true);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import { ClipboardComService } from '@renderer/services/other/clipboard.service'
import { EditorService } from '@renderer/services/editor/editor.service';
import { SystemEditorModel } from '@renderer/model/system.model';
import { SqlUtils } from '@renderer/utils/sql.utils';
import { DatabaseEnum } from "@renderer/enum/database.enum";

@Component({
selector: 'app-component-database-structure',
Expand Down Expand Up @@ -54,7 +55,11 @@ export class DatabaseStructureComponent extends BaseComponent implements AfterVi
request.config = await this.dataSourceService.getByAliasAsync(this.config.value);
this.metadataService.getDatabaseDDL(request, this.value).then(response => {
if (response.status) {
this.structure = response?.data?.columns[0]?.statement;
if (request.config.type === DatabaseEnum.mysql) {
this.structure = response?.data?.columns[0]?.['Create Database'];
} else {
this.structure = response?.data?.columns[0]?.statement;
}
} else {
this.messageService.error(response.message);
}
Expand Down
5 changes: 5 additions & 0 deletions src/renderer/components/query/quick/quick.query.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,11 @@ export class QuickQueryComponent extends BaseComponent {
} else {
this.spanSize = 8;
}

if (request.config.type === DatabaseEnum.postgresql) {
request.config.database = this.database;
}

switch (quick) {
case QuickEnum.database:
this.disabled.dialog = true;
Expand Down
Loading

0 comments on commit caf9103

Please sign in to comment.