Skip to content

🚀🚀 A GoLand plugin that automatically provides database field completion, tags, and generates Structs for writing ORM code. Supports: Gorm、Xorm、Beego、GoFrame, etc. 一个为了让你在 Goland 上写 ORM 能自动补全数据库字段、Tag、生成Struct 的插件。支持:Gorm、Xorm、Beego、GoFrame...)

License

Notifications You must be signed in to change notification settings

johnmai-dev/go-orm-helper

Folders and files

NameName
Last commit message
Last commit date
Nov 1, 2024
Jul 2, 2023
Oct 2, 2024
Jul 25, 2023
Aug 21, 2024
Feb 3, 2025
Jan 27, 2025
Aug 21, 2024
Jan 27, 2025
Jul 16, 2023
Jul 6, 2023
Aug 21, 2024
Aug 21, 2024
Aug 21, 2024
Aug 21, 2024
Jul 16, 2023
Jan 27, 2025
Jan 27, 2025
Jul 12, 2024
Jul 12, 2024
Oct 2, 2024
Dec 23, 2024

Repository files navigation

English | 简体中文 | 日本語 | 한국어

Go ORM Helper

Go ORM Helper

A GoLand plugin that automatically provides database field autocompletion, tags, and generates Structs for writing ORM code. Supports: Gorm、Xorm、Beego、GoFrame, etc.
⭐️ Star to support our work!

Inspired by Laravel Idea & PhpStorm metadata. When using ORM packages in Golang, I noticed that some ORM function parameters are strings and the IDE does not support code completion. It becomes inconvenient to write code when dealing with numerous fields. Previously, when I was writing PHP, I used similar plugins and found them extremely useful. Hence, this plugin was developed.

Features

  • ORM Code Completion.
    • Assisted code completion with @Model annotation.
    • Assisted code completion with @Table annotation.
    • Assisted code completion for custom SQL. 🚧[WIP]
  • SQL to Struct conversion. Supported
  • Go ORM Tags Live Template. Supported
  • More features waiting to be discovered and improved...

Supported ORM Code Completion.

Usage

Code Completion

https://www.jetbrains.com/help/go/auto-completing-code.html#code-completion-for-functions

guide.gif

Annotation

If the plugin is not compatible with your syntax, you can use the @Model or @Table helper. annotation.gif

The plugin will scan the Structs in your project. It is recommended to set the scanning scope. setting.png

Live Template

live-template.gif

SQL to Struct

Paste

paste.gif

Menu Action

Selected SQL -> Editor Popup Menu -> Go ORM Helper Tool -> SQL Convert Struct manual-sql-to-struct.png

Installation

Compatibility Range:

  • GoLand — 2022.2+
  • IntelliJ IDEA Ultimate — 2022.2+

Install Plugin from Jetbrains Marketplace

Get from Marketplace

Install Plugin from Disk

Star History

Star History Chart

About

🚀🚀 A GoLand plugin that automatically provides database field completion, tags, and generates Structs for writing ORM code. Supports: Gorm、Xorm、Beego、GoFrame, etc. 一个为了让你在 Goland 上写 ORM 能自动补全数据库字段、Tag、生成Struct 的插件。支持:Gorm、Xorm、Beego、GoFrame...)

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published