Golang GetDB示例

说明

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

编程语言: Golang

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

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

// ReloadG refetches the object from the database using the primary keys.
func (o *PubRelationship) ReloadG() error {
	if o == nil {
		return errors.New("chado: no PubRelationship provided for reload")
	}

	return o.Reload(boil.GetDB())
}

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

// ReloadAllG refetches every row with matching primary key column values
// and overwrites the original object slice with the newly updated slice.
func (o *TableinfoSlice) ReloadAllG() error {
	if o == nil {
		return errors.New("chado: empty TableinfoSlice provided for reload all")
	}

	return o.ReloadAll(boil.GetDB())
}

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

// ReloadG refetches the object from the database using the primary keys.
func (o *FeaturepropPub) ReloadG() error {
	if o == nil {
		return errors.New("chado: no FeaturepropPub provided for reload")
	}

	return o.Reload(boil.GetDB())
}

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

// ReloadG refetches the object from the database using the primary keys.
func (o *AuthUserRole) ReloadG() error {
	if o == nil {
		return errors.New("chado: no AuthUserRole provided for reload")
	}

	return o.Reload(boil.GetDB())
}

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

// DeleteG deletes a single Tableinfo record.
// DeleteG will match against the primary key column to find the record to delete.
func (o *Tableinfo) DeleteG() error {
	if o == nil {
		return errors.New("chado: no Tableinfo provided for deletion")
	}

	return o.Delete(boil.GetDB())
}

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

// DeleteG deletes a single CvtermDbxref record.
// DeleteG will match against the primary key column to find the record to delete.
func (o *CvtermDbxref) DeleteG() error {
	if o == nil {
		return errors.New("chado: no CvtermDbxref provided for deletion")
	}

	return o.Delete(boil.GetDB())
}

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

// ReloadAllG refetches every row with matching primary key column values
// and overwrites the original object slice with the newly updated slice.
func (o *CvtermDbxrefSlice) ReloadAllG() error {
	if o == nil {
		return errors.New("chado: empty CvtermDbxrefSlice provided for reload all")
	}

	return o.ReloadAll(boil.GetDB())
}

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

// ReloadG refetches the object from the database using the primary keys.
func (o *StockRelationshipCvterm) ReloadG() error {
	if o == nil {
		return errors.New("chado: no StockRelationshipCvterm provided for reload")
	}

	return o.Reload(boil.GetDB())
}

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

// DeleteG deletes a single AuthRolePermission record.
// DeleteG will match against the primary key column to find the record to delete.
func (o *AuthRolePermission) DeleteG() error {
	if o == nil {
		return errors.New("chado: no AuthRolePermission provided for deletion")
	}

	return o.Delete(boil.GetDB())
}

示例#10
文件: files.go 项目: zqzca/back

// ReloadAllG refetches every row with matching primary key column values
// and overwrites the original object slice with the newly updated slice.
func (o *FileSlice) ReloadAllG() error {
	if o == nil {
		return errors.New("models: empty FileSlice provided for reload all")
	}

	return o.ReloadAll(boil.GetDB())
}

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

// DeleteG deletes a single StockRelationshipCvterm record.
// DeleteG will match against the primary key column to find the record to delete.
func (o *StockRelationshipCvterm) DeleteG() error {
	if o == nil {
		return errors.New("chado: no StockRelationshipCvterm provided for deletion")
	}

	return o.Delete(boil.GetDB())
}

示例#12
文件: files.go 项目: zqzca/back

// ReloadG refetches the object from the database using the primary keys.
func (o *File) ReloadG() error {
	if o == nil {
		return errors.New("models: no File provided for reload")
	}

	return o.Reload(boil.GetDB())
}

示例#13
文件: files.go 项目: zqzca/back

// DeleteG deletes a single File record.
// DeleteG will match against the primary key column to find the record to delete.
func (o *File) DeleteG() error {
	if o == nil {
		return errors.New("models: no File provided for deletion")
	}

	return o.Delete(boil.GetDB())
}

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

// ReloadAllG refetches every row with matching primary key column values
// and overwrites the original object slice with the newly updated slice.
func (o *PubRelationshipSlice) ReloadAllG() error {
	if o == nil {
		return errors.New("chado: empty PubRelationshipSlice provided for reload all")
	}

	return o.ReloadAll(boil.GetDB())
}

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

// ReloadG refetches the object from the database using the primary keys.
func (o *Analysisfeature) ReloadG() error {
	if o == nil {
		return errors.New("chado: no Analysisfeature provided for reload")
	}

	return o.Reload(boil.GetDB())
}

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

// ReloadG refetches the object from the database using the primary keys.
func (o *AuthRolePermission) ReloadG() error {
	if o == nil {
		return errors.New("chado: no AuthRolePermission provided for reload")
	}

	return o.Reload(boil.GetDB())
}

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

// ReloadAllG refetches every row with matching primary key column values
// and overwrites the original object slice with the newly updated slice.
func (o *AnalysisfeatureSlice) ReloadAllG() error {
	if o == nil {
		return errors.New("chado: empty AnalysisfeatureSlice provided for reload all")
	}

	return o.ReloadAll(boil.GetDB())
}

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

// DeleteG deletes a single Stockcollection record.
// DeleteG will match against the primary key column to find the record to delete.
func (o *Stockcollection) DeleteG() error {
	if o == nil {
		return errors.New("chado: no Stockcollection provided for deletion")
	}

	return o.Delete(boil.GetDB())
}

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

// ReloadG refetches the object from the database using the primary keys.
func (o *CvtermDbxref) ReloadG() error {
	if o == nil {
		return errors.New("chado: no CvtermDbxref provided for reload")
	}

	return o.Reload(boil.GetDB())
}

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

// ReloadG refetches the object from the database using the primary keys.
func (o *Stockcollection) ReloadG() error {
	if o == nil {
		return errors.New("chado: no Stockcollection provided for reload")
	}

	return o.Reload(boil.GetDB())
}

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

// DeleteG deletes a single AuthUserRole record.
// DeleteG will match against the primary key column to find the record to delete.
func (o *AuthUserRole) DeleteG() error {
	if o == nil {
		return errors.New("chado: no AuthUserRole provided for deletion")
	}

	return o.Delete(boil.GetDB())
}

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

// ReloadAllG refetches every row with matching primary key column values
// and overwrites the original object slice with the newly updated slice.
func (o *StockcollectionSlice) ReloadAllG() error {
	if o == nil {
		return errors.New("chado: empty StockcollectionSlice provided for reload all")
	}

	return o.ReloadAll(boil.GetDB())
}

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

// ReloadAllG refetches every row with matching primary key column values
// and overwrites the original object slice with the newly updated slice.
func (o *AuthUserRoleSlice) ReloadAllG() error {
	if o == nil {
		return errors.New("chado: empty AuthUserRoleSlice provided for reload all")
	}

	return o.ReloadAll(boil.GetDB())
}

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

// DeleteG deletes a single Contact record.
// DeleteG will match against the primary key column to find the record to delete.
func (o *Contact) DeleteG() error {
	if o == nil {
		return errors.New("chado: no Contact provided for deletion")
	}

	return o.Delete(boil.GetDB())
}

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

// ReloadG refetches the object from the database using the primary keys.
func (o *Tableinfo) ReloadG() error {
	if o == nil {
		return errors.New("chado: no Tableinfo provided for reload")
	}

	return o.Reload(boil.GetDB())
}

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

// ReloadG refetches the object from the database using the primary keys.
func (o *Contact) ReloadG() error {
	if o == nil {
		return errors.New("chado: no Contact provided for reload")
	}

	return o.Reload(boil.GetDB())
}

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

// DeleteG deletes a single FeaturepropPub record.
// DeleteG will match against the primary key column to find the record to delete.
func (o *FeaturepropPub) DeleteG() error {
	if o == nil {
		return errors.New("chado: no FeaturepropPub provided for deletion")
	}

	return o.Delete(boil.GetDB())
}

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

// DeleteG deletes a single Analysisfeature record.
// DeleteG will match against the primary key column to find the record to delete.
func (o *Analysisfeature) DeleteG() error {
	if o == nil {
		return errors.New("chado: no Analysisfeature provided for deletion")
	}

	return o.Delete(boil.GetDB())
}

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

// ReloadAllG refetches every row with matching primary key column values
// and overwrites the original object slice with the newly updated slice.
func (o *FeaturepropPubSlice) ReloadAllG() error {
	if o == nil {
		return errors.New("chado: empty FeaturepropPubSlice provided for reload all")
	}

	return o.ReloadAll(boil.GetDB())
}

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

// DeleteG deletes a single PubRelationship record.
// DeleteG will match against the primary key column to find the record to delete.
func (o *PubRelationship) DeleteG() error {
	if o == nil {
		return errors.New("chado: no PubRelationship provided for deletion")
	}

	return o.Delete(boil.GetDB())
}

展开阅读全文