1 Star 1 Fork 0

bigbase/pg

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
inflection.go 378 Bytes
一键复制 编辑 原始数据 按行查看 历史
Vladimir Mihailenco 提交于 2017-08-21 18:51 +08:00 . orm: allow setting table name inflector
package orm
import (
"github.com/jinzhu/inflection"
)
var tableNameInflector func(string) string
func init() {
SetTableNameInflector(inflection.Plural)
}
// SetTableNameInflector overrides the default func that pluralizes
// model name to get table name, e.g. my_article becomes my_articles.
func SetTableNameInflector(fn func(string) string) {
tableNameInflector = fn
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Go
1
https://gitee.com/bigbase/pg.git
git@gitee.com:bigbase/pg.git
bigbase
pg
pg
v8.0.7

搜索帮助