xorm/names
fanybook aea91cc7de
All checks were successful
continuous-integration/drone/push Build is passing
add table & column comment for postgres(add table comment for mysql) (#2067)
让 postgres 支持字段注释,只在 v1.2.5 上测试过(不知道怎么 import master)

发现 master 分支好像大改了?模式表名带 schema 了

使用方式和 mysql 相同
```go
	type User struct {
		Id int64	`xorm:"pk autoincr"`
		Name string `json:"name" xorm:"not null default '' varchar(50) index(name_age) comment('用户 (it''s) 1; 名')"`
		Salt string
		Age int		`json:"age" xorm:"not null default 0 int(10) index(name_age) comment('年龄')"`
		Passwd string `xorm:"varchar(200)"`
		CreatedAt time.Time `xorm:"created"`
		UpdatedAt time.Time `xorm:"updated"`
	}

	_ = engine.Sync(new(User))

    func (model User) TableComment() string {
    	return "表注释"
    }
```

Co-authored-by: fanybook <fanybook@gmail.com>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Reviewed-on: #2067
Co-authored-by: fanybook <fanybook@noreply.gitea.io>
Co-committed-by: fanybook <fanybook@noreply.gitea.io>
2021-11-12 20:58:05 +08:00
..
mapper_test.go chore: improve titleCasedName performance (#1691) 2020-05-23 02:22:08 +00:00
mapper.go refactor insert condition generation (#1998) 2021-07-20 13:46:24 +08:00
table_name_test.go Fix table name (#1590) 2020-03-10 08:15:13 +00:00
table_name.go add table & column comment for postgres(add table comment for mysql) (#2067) 2021-11-12 20:58:05 +08:00