Golang WrapErr示例

说明

golang wraperr示例是从最受好评的开源项目中提取的实现代码,你可以参考下面示例的使用方式。

编程语言: Golang

命名空间/包名称: github.com/vattle/sqlboiler/boil

示例#1
文件: feature_cvtermprop.go 项目: dictyBase/Modware

// OneP returns a single featureCvtermprop record from the query, and panics on error.
func (q featureCvtermpropQuery) OneP() *FeatureCvtermprop {
	o, err := q.One()
	if err != nil {
		panic(boil.WrapErr(err))
	}

	return o
}

示例#2
文件: featureprop_pub.go 项目: dictyBase/Modware

// CountP returns the count of all FeaturepropPub records in the query, and panics on error.
func (q featurepropPubQuery) CountP() int64 {
	c, err := q.Count()
	if err != nil {
		panic(boil.WrapErr(err))
	}

	return c
}

示例#3
文件: featureprop_pub.go 项目: dictyBase/Modware

// FindFeaturepropPubGP retrieves a single record by ID, and panics on error.
func FindFeaturepropPubGP(featurepropPubID int, selectCols ...string) *FeaturepropPub {
	retobj, err := FindFeaturepropPub(boil.GetDB(), featurepropPubID, selectCols...)
	if err != nil {
		panic(boil.WrapErr(err))
	}

	return retobj
}

示例#4
文件: featureprop_pub.go 项目: dictyBase/Modware

// FeaturepropPubExistsGP checks if the FeaturepropPub row exists. Panics on error.
func FeaturepropPubExistsGP(featurepropPubID int) bool {
	e, err := FeaturepropPubExists(boil.GetDB(), featurepropPubID)
	if err != nil {
		panic(boil.WrapErr(err))
	}

	return e
}

示例#5
文件: featureprop_pub.go 项目: dictyBase/Modware

// OneP returns a single featurepropPub record from the query, and panics on error.
func (q featurepropPubQuery) OneP() *FeaturepropPub {
	o, err := q.One()
	if err != nil {
		panic(boil.WrapErr(err))
	}

	return o
}

示例#6
文件: tableinfo.go 项目: dictyBase/Modware

// FindTableinfoP retrieves a single record by ID with an executor, and panics on error.
func FindTableinfoP(exec boil.Executor, tableinfoID int, selectCols ...string) *Tableinfo {
	retobj, err := FindTableinfo(exec, tableinfoID, selectCols...)
	if err != nil {
		panic(boil.WrapErr(err))
	}

	return retobj
}

示例#7
文件: feature_dbxref.go 项目: dictyBase/Modware

// AllP returns all FeatureDbxref records from the query, and panics on error.
func (q featureDbxrefQuery) AllP() FeatureDbxrefSlice {
	o, err := q.All()
	if err != nil {
		panic(boil.WrapErr(err))
	}

	return o
}

示例#8
文件: auth_user_role.go 项目: dictyBase/Modware

// CountP returns the count of all AuthUserRole records in the query, and panics on error.
func (q authUserRoleQuery) CountP() int64 {
	c, err := q.Count()
	if err != nil {
		panic(boil.WrapErr(err))
	}

	return c
}

示例#9
文件: auth_user_role.go 项目: dictyBase/Modware

// Exists checks if the row exists in the table, and panics on error.
func (q authUserRoleQuery) ExistsP() bool {
	e, err := q.Exists()
	if err != nil {
		panic(boil.WrapErr(err))
	}

	return e
}

示例#10
文件: auth_user_role.go 项目: dictyBase/Modware

// OneP returns a single authUserRole record from the query, and panics on error.
func (q authUserRoleQuery) OneP() *AuthUserRole {
	o, err := q.One()
	if err != nil {
		panic(boil.WrapErr(err))
	}

	return o
}

示例#11
文件: auth_user_role.go 项目: dictyBase/Modware

// AllP returns all AuthUserRole records from the query, and panics on error.
func (q authUserRoleQuery) AllP() AuthUserRoleSlice {
	o, err := q.All()
	if err != nil {
		panic(boil.WrapErr(err))
	}

	return o
}

示例#12
文件: auth_user_role.go 项目: dictyBase/Modware

// AuthUserRoleExistsP checks if the AuthUserRole row exists. Panics on error.
func AuthUserRoleExistsP(exec boil.Executor, authUserRoleID int) bool {
	e, err := AuthUserRoleExists(exec, authUserRoleID)
	if err != nil {
		panic(boil.WrapErr(err))
	}

	return e
}

示例#13
文件: auth_user_role.go 项目: dictyBase/Modware

// AuthUserRoleExistsGP checks if the AuthUserRole row exists. Panics on error.
func AuthUserRoleExistsGP(authUserRoleID int) bool {
	e, err := AuthUserRoleExists(boil.GetDB(), authUserRoleID)
	if err != nil {
		panic(boil.WrapErr(err))
	}

	return e
}

示例#14
文件: feature_cvtermprop.go 项目: dictyBase/Modware

// FindFeatureCvtermpropGP retrieves a single record by ID, and panics on error.
func FindFeatureCvtermpropGP(featureCvtermpropID int, selectCols ...string) *FeatureCvtermprop {
	retobj, err := FindFeatureCvtermprop(boil.GetDB(), featureCvtermpropID, selectCols...)
	if err != nil {
		panic(boil.WrapErr(err))
	}

	return retobj
}

示例#15
文件: tableinfo.go 项目: dictyBase/Modware

// Exists checks if the row exists in the table, and panics on error.
func (q tableinfoQuery) ExistsP() bool {
	e, err := q.Exists()
	if err != nil {
		panic(boil.WrapErr(err))
	}

	return e
}

示例#16
文件: auth_user_role.go 项目: dictyBase/Modware

// FindAuthUserRoleGP retrieves a single record by ID, and panics on error.
func FindAuthUserRoleGP(authUserRoleID int, selectCols ...string) *AuthUserRole {
	retobj, err := FindAuthUserRole(boil.GetDB(), authUserRoleID, selectCols...)
	if err != nil {
		panic(boil.WrapErr(err))
	}

	return retobj
}

示例#17
文件: tableinfo.go 项目: dictyBase/Modware

// FindTableinfoGP retrieves a single record by ID, and panics on error.
func FindTableinfoGP(tableinfoID int, selectCols ...string) *Tableinfo {
	retobj, err := FindTableinfo(boil.GetDB(), tableinfoID, selectCols...)
	if err != nil {
		panic(boil.WrapErr(err))
	}

	return retobj
}

示例#18
文件: auth_user_role.go 项目: dictyBase/Modware

// FindAuthUserRoleP retrieves a single record by ID with an executor, and panics on error.
func FindAuthUserRoleP(exec boil.Executor, authUserRoleID int, selectCols ...string) *AuthUserRole {
	retobj, err := FindAuthUserRole(exec, authUserRoleID, selectCols...)
	if err != nil {
		panic(boil.WrapErr(err))
	}

	return retobj
}

示例#19
文件: feature_dbxref.go 项目: dictyBase/Modware

// OneP returns a single featureDbxref record from the query, and panics on error.
func (q featureDbxrefQuery) OneP() *FeatureDbxref {
	o, err := q.One()
	if err != nil {
		panic(boil.WrapErr(err))
	}

	return o
}

示例#20
文件: tableinfo.go 项目: dictyBase/Modware

// TableinfoExistsGP checks if the Tableinfo row exists. Panics on error.
func TableinfoExistsGP(tableinfoID int) bool {
	e, err := TableinfoExists(boil.GetDB(), tableinfoID)
	if err != nil {
		panic(boil.WrapErr(err))
	}

	return e
}

示例#21
文件: feature_dbxref.go 项目: dictyBase/Modware

// FindFeatureDbxrefGP retrieves a single record by ID, and panics on error.
func FindFeatureDbxrefGP(featureDbxrefID int, selectCols ...string) *FeatureDbxref {
	retobj, err := FindFeatureDbxref(boil.GetDB(), featureDbxrefID, selectCols...)
	if err != nil {
		panic(boil.WrapErr(err))
	}

	return retobj
}

示例#22
文件: tableinfo.go 项目: dictyBase/Modware

// TableinfoExistsP checks if the Tableinfo row exists. Panics on error.
func TableinfoExistsP(exec boil.Executor, tableinfoID int) bool {
	e, err := TableinfoExists(exec, tableinfoID)
	if err != nil {
		panic(boil.WrapErr(err))
	}

	return e
}

示例#23
文件: featureprop_pub.go 项目: dictyBase/Modware

// FeaturepropPubExistsP checks if the FeaturepropPub row exists. Panics on error.
func FeaturepropPubExistsP(exec boil.Executor, featurepropPubID int) bool {
	e, err := FeaturepropPubExists(exec, featurepropPubID)
	if err != nil {
		panic(boil.WrapErr(err))
	}

	return e
}

示例#24
文件: tableinfo.go 项目: dictyBase/Modware

// OneP returns a single tableinfo record from the query, and panics on error.
func (q tableinfoQuery) OneP() *Tableinfo {
	o, err := q.One()
	if err != nil {
		panic(boil.WrapErr(err))
	}

	return o
}

示例#25
文件: featureprop_pub.go 项目: dictyBase/Modware

// AllP returns all FeaturepropPub records from the query, and panics on error.
func (q featurepropPubQuery) AllP() FeaturepropPubSlice {
	o, err := q.All()
	if err != nil {
		panic(boil.WrapErr(err))
	}

	return o
}

示例#26
文件: tableinfo.go 项目: dictyBase/Modware

// AllP returns all Tableinfo records from the query, and panics on error.
func (q tableinfoQuery) AllP() TableinfoSlice {
	o, err := q.All()
	if err != nil {
		panic(boil.WrapErr(err))
	}

	return o
}

示例#27
文件: featureprop_pub.go 项目: dictyBase/Modware

// Exists checks if the row exists in the table, and panics on error.
func (q featurepropPubQuery) ExistsP() bool {
	e, err := q.Exists()
	if err != nil {
		panic(boil.WrapErr(err))
	}

	return e
}

示例#28
文件: tableinfo.go 项目: dictyBase/Modware

// CountP returns the count of all Tableinfo records in the query, and panics on error.
func (q tableinfoQuery) CountP() int64 {
	c, err := q.Count()
	if err != nil {
		panic(boil.WrapErr(err))
	}

	return c
}

示例#29
文件: featureprop_pub.go 项目: dictyBase/Modware

// FindFeaturepropPubP retrieves a single record by ID with an executor, and panics on error.
func FindFeaturepropPubP(exec boil.Executor, featurepropPubID int, selectCols ...string) *FeaturepropPub {
	retobj, err := FindFeaturepropPub(exec, featurepropPubID, selectCols...)
	if err != nil {
		panic(boil.WrapErr(err))
	}

	return retobj
}

示例#30
文件: cvterm_dbxref.go 项目: dictyBase/Modware

// FindCvtermDbxrefP retrieves a single record by ID with an executor, and panics on error.
func FindCvtermDbxrefP(exec boil.Executor, cvtermDbxrefID int, selectCols ...string) *CvtermDbxref {
	retobj, err := FindCvtermDbxref(exec, cvtermDbxrefID, selectCols...)
	if err != nil {
		panic(boil.WrapErr(err))
	}

	return retobj
}

展开阅读全文