当前位置: 首页>>代码示例>>Golang>>正文


Golang gomodel.Executor类代码示例

本文整理汇总了Golang中github.com/cosiner/gomodel.Executor的典型用法代码示例。如果您正苦于以下问题:Golang Executor类的具体用法?Golang Executor怎么用?Golang Executor使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了Executor类的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Golang代码示例。

示例1: PrimaryKey

func PrimaryKey(exec gomodel.Executor) string {
	return exec.Driver().PrimaryKey()
}
开发者ID:shyrobbiani,项目名称:gomodel,代码行数:3,代码来源:error.go

示例2: QueryOneResultById

func QueryOneResultById(exec gomodel.Executor, sqlid uint64, ptr interface{}, args ...interface{}) error {
	sc := exec.QueryById(sqlid, args...)
	defer sc.Close()
	return sc.One(ptr)
}
开发者ID:shyrobbiani,项目名称:gomodel,代码行数:5,代码来源:utils.go

示例3: DuplicatePrimaryKeyError

func DuplicatePrimaryKeyError(exec gomodel.Executor, err error, newErr error) error {
	pk := exec.Driver().PrimaryKey()
	return parseKeyError(err, pk, newErr, exec.Driver().DuplicateKey)
}
开发者ID:shyrobbiani,项目名称:gomodel,代码行数:4,代码来源:error.go

示例4: ForeignKeyError

func ForeignKeyError(exec gomodel.Executor, err error, key string, newErr error) error {
	fk := exec.Driver().ForeignKey
	return parseKeyError(err, key, newErr, fk)
}
开发者ID:shyrobbiani,项目名称:gomodel,代码行数:4,代码来源:error.go

示例5: ForeignKeyFunc

func ForeignKeyFunc(exec gomodel.Executor, err error, keyfunc func(key string) error) error {
	fk := exec.Driver().ForeignKey
	return parseKeyFunc(err, keyfunc, fk)
}
开发者ID:shyrobbiani,项目名称:gomodel,代码行数:4,代码来源:error.go

示例6: DuplicateKeyError

func DuplicateKeyError(exec gomodel.Executor, err error, key string, newErr error) error {
	dk := exec.Driver().DuplicateKey
	return parseKeyError(err, key, newErr, dk)
}
开发者ID:shyrobbiani,项目名称:gomodel,代码行数:4,代码来源:error.go

示例7: DuplicateKeyFunc

func DuplicateKeyFunc(exec gomodel.Executor, err error, keyfunc func(key string) error) error {
	dk := exec.Driver().DuplicateKey
	return parseKeyFunc(err, keyfunc, dk)
}
开发者ID:shyrobbiani,项目名称:gomodel,代码行数:4,代码来源:error.go


注:本文中的github.com/cosiner/gomodel.Executor类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。