gen icon indicating copy to clipboard operation
gen copied to clipboard

Converts a database into gorm structs and RESTful api

Results 30 gen issues
Sort by recently updated
recently updated
newest added

Library version master@[bac0f1d](https://github.com/smallnest/gen/commit/bac0f1d81b1eb0167db710e78ef467833c8b7cbc). Outputs incorrect version number: ``` $ gen --version v0.9.27 (08/04/2020) ``` Generates models with unused imports: ``` import ( "database/sql" // unused "time" "github.com/satori/go.uuid" // unused "gorm.io/gorm"...

目前生成的model中, BeforeSave函数原型为BeforeSave() error, 提示应该是BeforeSave(*gorm.DB) error,这里是什么原因呢?gorm版本v1.22.4

`go install` installs the latest release v0.9.27 (08/04/2020). Many improvements have been made since then. Please create a new release which includes the improvements.

gen always import github.com/guregu/null and will generate ```go .... var ( _ = null.Bool() ) ```

When collecting table schemas, we must check selectel database name to avoid conflicts with multiple cloned databases. For example, you can create database foo, clone it to foo_dev, set the...

Hi! When I run utility, I will set up --database flag with database name, same from connStr But, on main.go line 229 you will check database name, otherwise too many...

hey, there. I wonder if we counld add a post hook function inside http handlers. We can modify fields here. Here's an example. ```golang func GetAllSystemRole_(w http.ResponseWriter, r *http.Request, ps...

I used Postgres, and found this generation does not support int4[]. The following is what I got: `type: _INT4 error: unknown sql type: _int4`