Skip to content

Commit dca0d89

Browse files
authored
Merge pull request #5 from maiqingqiang/v1.2.0
V1.2.0
2 parents 0752b9d + 2cfc60e commit dca0d89

Some content is hidden

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

58 files changed

+4867
-896
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@
22
.idea
33
.qodana
44
build
5+
.DS_Store

CHANGELOG.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,14 @@
44

55
## [Unreleased]
66

7+
## [1.2.0] - 2023-07-15
8+
9+
### Added
10+
- Support GoFrame ORM.
11+
- Support Go ORM Tags Live Template.
12+
- Refactor Code Completion. Better Performance!
13+
- Refactor GoORMHelper Cache Manager.
14+
715
## [1.1.0] - 2023-07-04
816

917
### Added
@@ -34,7 +42,8 @@
3442
- ORM Code Completion
3543
- SQL to Struct
3644

37-
[Unreleased]: https://github.com/maiqingqiang/go-orm-helper/compare/v1.1.0...HEAD
45+
[Unreleased]: https://github.com/maiqingqiang/go-orm-helper/compare/v1.2.0...HEAD
46+
[1.2.0]: https://github.com/maiqingqiang/go-orm-helper/compare/v1.1.0...v1.2.0
3847
[1.1.0]: https://github.com/maiqingqiang/go-orm-helper/compare/v1.0.2...v1.1.0
3948
[1.0.2]: https://github.com/maiqingqiang/go-orm-helper/compare/v1.0.1...v1.0.2
4049
[1.0.1]: https://github.com/maiqingqiang/go-orm-helper/compare/v1.0.0...v1.0.1

DESCRIPTION.md

Lines changed: 29 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
<p><b>Go ORM Helper plugin for GoLand.</b></p>
1+
<p> English | <a href="#zh_CN">简体中文</a> | <a href="#ja_JP">日本語</a> | <a href="#ko_KR">한국어</a> </p>
2+
3+
<p><b><a id="en_US">Go ORM Helper plugin for GoLand.</a></b></p>
24
<br/>
35
<p>
46
<b>
@@ -26,20 +28,25 @@
2628
</ul>
2729
</li>
2830
<li>SQL to Struct conversion.</li>
31+
<li>Go ORM Tags Live Template.</li>
32+
<li>More packages waiting to be discovered and improved...</li>
2933
</ul>
3034

31-
<h2>Supported Go ORM Packages</h2>
35+
<h2>Supported ORM Code Completion.</h2>
3236
<ul>
3337
<li><a href="https://github.com/go-gorm/gorm">Gorm</a></li>
3438
<li><a href="https://gitea.com/xorm/xorm">Xorm</a></li>
35-
<li>More packages waiting to be discovered and improved...</li>
39+
<li><a href="https://github.com/gogf/gf">GoFrame</a></li>
40+
<li><a href="https://github.com/maiqingqiang/go-orm-helper/blob/main/SUPPORTED.md">More Supported</a></li>
3641
</ul>
3742

3843
<br/>
3944
<hr/>
4045
<br/>
4146

42-
<p><b>基于 GoLand 的 Go ORM 助手插件。</b></p>
47+
<p><a href="#en_US"> English </a>| 简体中文 | <a href="#ja_JP">日本語</a> | <a href="#ko_KR">한국어</a> </p>
48+
49+
<p><b><a id="zh_CN">基于 GoLand 的 Go ORM 助手插件。</a></b></p>
4350
<br/>
4451
<p>
4552
<b>
@@ -66,20 +73,25 @@
6673
</ul>
6774
</li>
6875
<li>SQL 转 Struct</li>
76+
<li>Go ORM Tags Live Template</li>
77+
<li>更多等你去发现与改进...</li>
6978
</ul>
7079

7180
<h2>支持的 Go ORM</h2>
7281
<ul>
7382
<li><a href="https://github.com/go-gorm/gorm">Gorm</a></li>
7483
<li><a href="https://gitea.com/xorm/xorm">Xorm</a></li>
75-
<li>更多等你去发现与改进...</li>
84+
<li><a href="https://github.com/gogf/gf">GoFrame</a></li>
85+
<li><a href="https://github.com/maiqingqiang/go-orm-helper/blob/main/SUPPORTED.md">支持明细</a></li>
7686
</ul>
7787

7888
<br/>
7989
<hr/>
8090
<br/>
8191

82-
<p><b>GoLand IDEベースのGo ORMアシスタントプラグイン。</b></p>
92+
<p><a href="#en_US"> English </a>| <a href="#zh_CN">简体中文</a> | 日本語 | <a href="#ko_KR">한국어</a> </p>
93+
94+
<p><b><a id="ja_JP">GoLand IDEベースのGo ORMアシスタントプラグイン。</a></b></p>
8395
<br/>
8496
<p>
8597
<b>
@@ -107,20 +119,25 @@
107119
</ul>
108120
</li>
109121
<li>SQL 変換 Struct</li>
122+
<li>Go ORM Tag リアルタイムテンプレート</li>
123+
<li>発見と改善を待っています...</li>
110124
</ul>
111125

112126
<h2>サポートされるGo ORM</h2>
113127
<ul>
114128
<li><a href="https://github.com/go-gorm/gorm">Gorm</a></li>
115129
<li><a href="https://gitea.com/xorm/xorm">Xorm</a></li>
116-
<li>発見と改善を待っています...</li>
130+
<li><a href="https://github.com/gogf/gf">GoFrame</a></li>
131+
<li><a href="https://github.com/maiqingqiang/go-orm-helper/blob/main/SUPPORTED.md">サポート詳細</a></li>
117132
</ul>
118133

119134
<br/>
120135
<hr/>
121136
<br/>
122137

123-
<p><b>GoLand 기반 Go ORM 지원 플러그인.</b></p>
138+
<p><a href="#en_US"> English </a>| <a href="#zh_CN">简体中文</a> | <a href="#ja_JP">日本語</a> | 한국어 </p>
139+
140+
<p><b><a id="ko_KR">GoLand 기반 Go ORM 지원 플러그인.</a></b></p>
124141
<br/>
125142
<p>
126143
<b>
@@ -146,11 +163,14 @@
146163
</ul>
147164
</li>
148165
<li>SQL 변환 Struct</li>
166+
<li>Go ORM Tag 실시간 템플릿</li>
167+
<li>더 많은 것을 발견하고 개선하기를 기다린다...</li>
149168
</ul>
150169

151170
<h2>지원되는 Go ORM</h2>
152171
<ul>
153172
<li><a href="https://github.com/go-gorm/gorm">Gorm</a></li>
154173
<li><a href="https://gitea.com/xorm/xorm">Xorm</a></li>
155-
<li>더 많은 것을 발견하고 개선하기를 기다린다...</li>
174+
<li><a href="https://github.com/gogf/gf">GoFrame</a></li>
175+
<li><a href="https://github.com/maiqingqiang/go-orm-helper/blob/main/SUPPORTED.md">지원 내역</a></li>
156176
</ul>

README-ja_JP.md

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<h1 align="center">Go ORM アシスタント</h1>
66
</div>
77

8-
<p align="center">GoLand にORMを書くためにデータベースフィールド、Tag、Struct を自動的に補完する Jetbrains プラグイン。サポート:Gorm、Xorm、Beego、GoFrame...)</p>
8+
<p align="center">GoLand にORMを書くためにデータベースフィールド、Tag、Struct を自動的に補完する Jetbrains プラグイン。サポート:Gorm、Xorm、Beego、GoFrame...)<br>私たちの仕事をサポートするために ⭐️スター をください!</p>
99

1010
> インスピレーション源の [Laravel Idea](https://plugins.jetbrains.com/plugin/13441-laravel-idea) &
1111
> [PhpStorm metadata](https://www.jetbrains.com/help/phpstorm/ide-advanced-metadata.html).
@@ -19,24 +19,18 @@
1919
- [x] @Model 注記補助補完
2020
- [x] @Table 注記補助補完
2121
- [ ] カスタムSQLアクセシビリティ不全 🚧[WIP]
22-
- [x] SQL 変換 Struct
23-
- [x] Gorm
24-
- [x] Xorm
25-
- [x] 共通 Struct
26-
- [ ] GoFrame 🚧[WIP]
27-
- [ ] Beego 🚧[WIP]
28-
- [ ] sqlx 🚧[WIP]
29-
- [ ] Tag コード補完 🚧[WIP]
22+
- [x] SQL 変換 Struct [サポート詳細](./SUPPORTED.md#supported-sql-to-struct-conversion)
23+
- [x] Go ORM Tag リアルタイムテンプレート [サポート詳細](./SUPPORTED.md#supported-orm-tags-live-template)
3024
- 発見と改善を待っています...
3125

3226
## サポートされているORM
3327

3428
- [x] [Gorm](https://github.com/go-gorm/gorm)
3529
- [x] [Xorm](https://gitea.com/xorm/xorm)
36-
- [ ] [GoFrame](https://github.com/gogf/gf) 🚧[WIP]
30+
- [x] [GoFrame](https://github.com/gogf/gf)
3731
- [ ] [Beego](https://github.com/beego/beego) 🚧[WIP]
3832
- [ ] [sqlx](https://github.com/jmoiron/sqlx) 🚧[WIP]
39-
- 発見と改善を待っています...
33+
- [サポート詳細](./SUPPORTED.md)
4034

4135
## 使用
4236

README-ko_KR.md

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@
55
<h1 align="center">Go ORM 도우미</h1>
66
</div>
77

8-
<p align="center">GoLand 에 ORM을 쓸 수 있도록 데이터베이스 필드, Tag, Struct를 자동으로 완성하는 플러그인지원: Gorm, Xorm, Beego, GoFrame...)</p>
8+
<p align="center">GoLand 에 ORM을 쓸 수 있도록 데이터베이스 필드, Tag, Struct를 자동으로 완성하는 플러그인지원: Gorm, Xorm, Beego, GoFrame...)
9+
<br>우리의 작업을 지원하기 위해 ⭐️스타를 부탁드립니다!</p>
910

1011
> [Laravel Idea](https://plugins.jetbrains.com/plugin/13441-laravel-idea) &
1112
> [PhpStorm metadata](https://www.jetbrains.com/help/phpstorm/ide-advanced-metadata.html) 에서영감을 받았습니다.본인이 Go의 ORM
@@ -18,24 +19,18 @@
1819
- [x] @Model 메모 보조 완성
1920
- [x] @Table 메모 보조 완성
2021
- [ ] 사용자 정의 SQL 보조 불완전 🚧[WIP]
21-
- [x] SQL 변환 Struct
22-
- [x] Gorm
23-
- [x] Xorm
24-
- [x] 공통 Struct
25-
- [ ] GoFrame 🚧[WIP]
26-
- [ ] Beego 🚧[WIP]
27-
- [ ] sqlx 🚧[WIP]
28-
- [ ] Tag 코드 완성 🚧[WIP]
22+
- [x] SQL 변환 Struct [지원 내역](./SUPPORTED.md#supported-sql-to-struct-conversion)
23+
- [x] Go ORM Tag 실시간 템플릿 [지원 내역](./SUPPORTED.md#supported-orm-tags-live-template)
2924
- 더 많은 것을 발견하고 개선하기를 기다린다...
3025

3126
## 지원되는 ORM
3227

3328
- [x] [Gorm](https://github.com/go-gorm/gorm)
3429
- [x] [Xorm](https://gitea.com/xorm/xorm)
35-
- [ ] [GoFrame](https://github.com/gogf/gf) 🚧[WIP]
30+
- [x] [GoFrame](https://github.com/gogf/gf)
3631
- [ ] [Beego](https://github.com/beego/beego) 🚧[WIP]
3732
- [ ] [sqlx](https://github.com/jmoiron/sqlx) 🚧[WIP]
38-
- 더 많은 것을 발견하고 개선하기를 기다린다...
33+
- [지원 내역](./SUPPORTED.md)
3934

4035
## 사용
4136

README-zh_CN.md

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@
55
<h1 align="center">Go ORM 助手</h1>
66
</div>
77

8-
<p align="center">一个为了让你在 GoLand 上写 ORM 能自动补全数据库字段、Tag、生成Struct 的插件。支持:Gorm、Xorm、Beego、GoFrame...)</p>
8+
<p align="center">一个为了让你在 GoLand 上写 ORM 能自动补全数据库字段、Tag、生成Struct 的插件。支持:Gorm、Xorm、Beego、GoFrame...)
9+
<br>给个 ⭐️Star 支持我们的工作吧!</p>
910

1011
> 灵感来源 [Laravel Idea](https://plugins.jetbrains.com/plugin/13441-laravel-idea) &
1112
> [PhpStorm metadata](https://www.jetbrains.com/help/phpstorm/ide-advanced-metadata.html)。 本人使用 Go 的 ORM 包时,
@@ -18,24 +19,18 @@
1819
- [x] @Model 注解辅助补全
1920
- [x] @Table 注解辅助补全
2021
- [ ] 自定义 SQL 辅助不全 🚧[WIP]
21-
- [x] SQL 转 Struct
22-
- [x] Gorm
23-
- [x] Xorm
24-
- [x] 通用 Struct
25-
- [ ] GoFrame 🚧[WIP]
26-
- [ ] Beego 🚧[WIP]
27-
- [ ] sqlx 🚧[WIP]
28-
- [ ] Tag 代码补全 🚧[WIP]
22+
- [x] SQL 转 Struct [支持明细](./SUPPORTED.md#supported-sql-to-struct-conversion)
23+
- [x] Go ORM Tag 实时模版 [支持明细](./SUPPORTED.md#supported-orm-tags-live-template)
2924
- 更多等你去发现与改进...
3025

3126
## 支持的 ORM
3227

3328
- [x] [Gorm](https://github.com/go-gorm/gorm)
3429
- [x] [Xorm](https://gitea.com/xorm/xorm)
35-
- [ ] [GoFrame](https://github.com/gogf/gf) 🚧[WIP]
30+
- [x] [GoFrame](https://github.com/gogf/gf)
3631
- [ ] [Beego](https://github.com/beego/beego) 🚧[WIP]
3732
- [ ] [sqlx](https://github.com/jmoiron/sqlx) 🚧[WIP]
38-
- 更多等你去发现与改进...
33+
- [支持明细](./SUPPORTED.md)
3934

4035
## 使用
4136

README.md

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@ English | [简体中文](./README-zh_CN.md) | [日本語](./README-ja_JP.md) | [
55
<h1 align="center">Go ORM Helper</h1>
66
</div>
77

8-
<p align="center">A GoLand plugin that automatically provides database field autocompletion, tags, and generates Structs for writing ORM code. Supports: Gorm、Xorm、Beego、GoFrame, etc.</p>
8+
<p align="center">A GoLand plugin that automatically provides database field autocompletion, tags, and generates Structs
9+
for writing ORM code. Supports: Gorm、Xorm、Beego、GoFrame, etc.<br/>⭐️ Star to support our work!</p>
910

1011
> Inspired by [Laravel Idea](https://plugins.jetbrains.com/plugin/13441-laravel-idea) &
1112
> [PhpStorm metadata](https://www.jetbrains.com/help/phpstorm/ide-advanced-metadata.html). When using ORM packages in Golang,
@@ -18,23 +19,17 @@ English | [简体中文](./README-zh_CN.md) | [日本語](./README-ja_JP.md) | [
1819
- [x] Assisted code completion with @Model annotation.
1920
- [x] Assisted code completion with @Table annotation.
2021
- [ ] Assisted code completion for custom SQL. 🚧[WIP]
21-
- [x] SQL to Struct conversion.
22-
- [x] Gorm
23-
- [x] Xorm
24-
- [x] Generic Struct
25-
- [ ] GoFrame
26-
- [ ] Beego
27-
- [ ] sqlx
28-
- [ ] Tag Code Completion. 🚧[WIP]
22+
- [x] SQL to Struct conversion. [Supported](./SUPPORTED.md#supported-sql-to-struct-conversion)
23+
- [x] Go ORM Tags Live Template. [Supported](./SUPPORTED.md#supported-orm-tags-live-template)
2924
- More features waiting to be discovered and improved...
3025

31-
## Supported ORM Packages
26+
## Supported ORM Code Completion.
3227
- [x] [Gorm](https://github.com/go-gorm/gorm)
3328
- [x] [Xorm](https://gitea.com/xorm/xorm)
34-
- [ ] [GoFrame](https://github.com/gogf/gf) 🚧[WIP]
29+
- [x] [GoFrame](https://github.com/gogf/gf)
3530
- [ ] [Beego](https://github.com/beego/beego) 🚧[WIP]
3631
- [ ] [sqlx](https://github.com/jmoiron/sqlx) 🚧[WIP]
37-
- More packages waiting to be discovered and improved...
32+
- [More Supported](./SUPPORTED.md)
3833

3934
## Usage
4035
![guide.gif](assets%2Fguide.gif)

SUPPORTED.md

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# Supported
2+
3+
## Supported SQL to Struct conversion
4+
5+
- [x] Generic Struct
6+
- [x] [Gorm](https://github.com/go-gorm/gorm)
7+
- [x] [Xorm](https://gitea.com/xorm/xorm)
8+
- [x] [GoFrame](https://github.com/gogf/gf)
9+
- [ ] [Beego](https://github.com/beego/beego) 🚧[WIP]
10+
- [ ] [sqlx](https://github.com/jmoiron/sqlx) 🚧[WIP]
11+
12+
## Supported ORM Tags Live Template
13+
14+
[Go ORM Tags.xml](./src/main/resources/liveTemplates/Go%20ORM%20Tags.xml)
15+
16+
| Tag | ORM |
17+
|--------------|-------------------------------------------------------------------------|
18+
| `gorm:""` | [Gorm](https://github.com/go-gorm/gorm) |
19+
| `xorm:""` | [Xorm](https://gitea.com/xorm/xorm) |
20+
| `orm:"-"` | [GoFrame](https://github.com/gogf/gf) |
21+
| `orm:"-"` | [Beego](https://github.com/beego/beego) |
22+
| `gqlgen:"-"` | [ent.](https://entgo.io/) |
23+
| `boil:"-"` | [SQLBoiler](https://github.com/volatiletech/sqlboiler) |
24+
| `pg:"-"` | [pg](https://github.com/go-pg/pg) |
25+
| `bun:"-"` | [Bun](https://github.com/uptrace/bun) |
26+
| `reform:"-"` | [reform](https://github.com/go-reform/reform) |
27+
| `aorm:"-"` | [aorm](https://github.com/tangpanqing/aorm) |
28+
| `db:"-"` | [sqlx](https://github.com/jmoiron/sqlx) |
29+
| `db:"-"` | [gorp](https://github.com/go-gorp/gorp) |
30+
| `db:"-"` | [upper/db](https://github.com/upper/db) |
31+
| `db:"-"` | [Buffalo Model](https://gobuffalo.io/pt/documentation/database/models/) |
32+
| `db:"-"` | [go-sqlbuilder](https://github.com/huandu/go-sqlbuilder) |
33+
| `db:"-"` | [rel](https://github.com/go-rel/rel) |
34+
| `db:"-"` | [Bob](https://github.com/stephenafamo/bob) |
35+
| `db:"-"` | [lore](https://github.com/abrahambotros/lore) |
36+
| `db:"-"` | [GoBatis](https://github.com/mei-rune/GoBatis) |
37+

assets/guide.gif

5.62 MB
Loading

example/goframe/go.mod

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
module goframe
2+
3+
go 1.20
4+
5+
require github.com/gogf/gf/v2 v2.4.4
6+
7+
require (
8+
github.com/BurntSushi/toml v1.1.0 // indirect
9+
github.com/clbanning/mxj/v2 v2.5.5 // indirect
10+
github.com/fatih/color v1.13.0 // indirect
11+
github.com/fsnotify/fsnotify v1.5.4 // indirect
12+
github.com/go-logr/logr v1.2.3 // indirect
13+
github.com/go-logr/stdr v1.2.2 // indirect
14+
github.com/gorilla/websocket v1.5.0 // indirect
15+
github.com/grokify/html-strip-tags-go v0.0.1 // indirect
16+
github.com/magiconair/properties v1.8.6 // indirect
17+
github.com/mattn/go-colorable v0.1.9 // indirect
18+
github.com/mattn/go-isatty v0.0.14 // indirect
19+
github.com/mattn/go-runewidth v0.0.9 // indirect
20+
github.com/olekukonko/tablewriter v0.0.5 // indirect
21+
go.opentelemetry.io/otel v1.7.0 // indirect
22+
go.opentelemetry.io/otel/sdk v1.7.0 // indirect
23+
go.opentelemetry.io/otel/trace v1.7.0 // indirect
24+
golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2 // indirect
25+
golang.org/x/sys v0.0.0-20220412211240-33da011f77ad // indirect
26+
golang.org/x/text v0.3.8-0.20211105212822-18b340fc7af2 // indirect
27+
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b // indirect
28+
)

0 commit comments

Comments
 (0)