當前位置: 首頁>>代碼示例>>Golang>>正文


Golang qm.Where函數代碼示例

本文整理匯總了Golang中github.com/vattle/sqlboiler/queries/qm.Where函數的典型用法代碼示例。如果您正苦於以下問題:Golang Where函數的具體用法?Golang Where怎麽用?Golang Where使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。


在下文中一共展示了Where函數的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Golang代碼示例。

示例1: chunkExists

func (c Controller) chunkExists(fid string, hash string) bool {
	chunkCount, err := models.Chunks(c.DB, qm.Where("file_id=$1 and hash=$2", fid, hash)).Count()

	if err != nil {
		c.Error("Failed to look up chunk count", err)
		return false
	}

	return chunkCount > 0
}
開發者ID:zqzca,項目名稱:back,代碼行數:10,代碼來源:create.go

示例2: Environment2PhenotypeComparison

// Environment2PhenotypeComparison pointed to by the foreign key.
func (o *Environment) Environment2PhenotypeComparison(exec boil.Executor, mods ...qm.QueryMod) phenotypeComparisonQuery {
	queryMods := []qm.QueryMod{
		qm.Where("environment2_id=$1", o.EnvironmentID),
	}

	queryMods = append(queryMods, mods...)

	query := PhenotypeComparisons(exec, queryMods...)
	queries.SetFrom(query.Query, "\"phenotype_comparison\"")

	return query
}
開發者ID:dictyBase,項目名稱:Modware,代碼行數:13,代碼來源:environment.go

示例3: Featureprop

// Featureprop pointed to by the foreign key.
func (o *FeaturepropPub) Featureprop(exec boil.Executor, mods ...qm.QueryMod) featurepropQuery {
	queryMods := []qm.QueryMod{
		qm.Where("featureprop_id=$1", o.FeaturepropID),
	}

	queryMods = append(queryMods, mods...)

	query := Featureprops(exec, queryMods...)
	queries.SetFrom(query.Query, "\"featureprop\"")

	return query
}
開發者ID:dictyBase,項目名稱:Modware,代碼行數:13,代碼來源:featureprop_pub.go

示例4: Dbxref

// Dbxref pointed to by the foreign key.
func (o *FeatureDbxref) Dbxref(exec boil.Executor, mods ...qm.QueryMod) dbxrefQuery {
	queryMods := []qm.QueryMod{
		qm.Where("dbxref_id=$1", o.DbxrefID),
	}

	queryMods = append(queryMods, mods...)

	query := Dbxrefs(exec, queryMods...)
	queries.SetFrom(query.Query, "\"dbxref\"")

	return query
}
開發者ID:dictyBase,項目名稱:Modware,代碼行數:13,代碼來源:feature_dbxref.go

示例5: AuthRole

// AuthRole pointed to by the foreign key.
func (o *AuthUserRole) AuthRole(exec boil.Executor, mods ...qm.QueryMod) authRoleQuery {
	queryMods := []qm.QueryMod{
		qm.Where("auth_role_id=$1", o.AuthRoleID),
	}

	queryMods = append(queryMods, mods...)

	query := AuthRoles(exec, queryMods...)
	queries.SetFrom(query.Query, "\"auth_role\"")

	return query
}
開發者ID:dictyBase,項目名稱:Modware,代碼行數:13,代碼來源:auth_user_role.go

示例6: Cvterm

// Cvterm pointed to by the foreign key.
func (o *CvtermDbxref) Cvterm(exec boil.Executor, mods ...qm.QueryMod) cvtermQuery {
	queryMods := []qm.QueryMod{
		qm.Where("cvterm_id=$1", o.CvtermID),
	}

	queryMods = append(queryMods, mods...)

	query := Cvterms(exec, queryMods...)
	queries.SetFrom(query.Query, "\"cvterm\"")

	return query
}
開發者ID:dictyBase,項目名稱:Modware,代碼行數:13,代碼來源:cvterm_dbxref.go

示例7: SubjectContactRelationship

// SubjectContactRelationship pointed to by the foreign key.
func (o *Contact) SubjectContactRelationship(exec boil.Executor, mods ...qm.QueryMod) contactRelationshipQuery {
	queryMods := []qm.QueryMod{
		qm.Where("subject_id=$1", o.ContactID),
	}

	queryMods = append(queryMods, mods...)

	query := ContactRelationships(exec, queryMods...)
	queries.SetFrom(query.Query, "\"contact_relationship\"")

	return query
}
開發者ID:dictyBase,項目名稱:Modware,代碼行數:13,代碼來源:contact.go

示例8: Contact

// Contact pointed to by the foreign key.
func (o *Stockcollection) Contact(exec boil.Executor, mods ...qm.QueryMod) contactQuery {
	queryMods := []qm.QueryMod{
		qm.Where("contact_id=$1", o.ContactID),
	}

	queryMods = append(queryMods, mods...)

	query := Contacts(exec, queryMods...)
	queries.SetFrom(query.Query, "\"contact\"")

	return query
}
開發者ID:dictyBase,項目名稱:Modware,代碼行數:13,代碼來源:stockcollection.go

示例9: Genotype

// Genotype pointed to by the foreign key.
func (o *Phendesc) Genotype(exec boil.Executor, mods ...qm.QueryMod) genotypeQuery {
	queryMods := []qm.QueryMod{
		qm.Where("genotype_id=$1", o.GenotypeID),
	}

	queryMods = append(queryMods, mods...)

	query := Genotypes(exec, queryMods...)
	queries.SetFrom(query.Query, "\"genotype\"")

	return query
}
開發者ID:dictyBase,項目名稱:Modware,代碼行數:13,代碼來源:phendesc.go

示例10: JbrowseTrack

// JbrowseTrack pointed to by the foreign key.
func (o *JbrowseOrganism) JbrowseTrack(exec boil.Executor, mods ...qm.QueryMod) jbrowseTrackQuery {
	queryMods := []qm.QueryMod{
		qm.Where("jbrowse_organism_id=$1", o.JbrowseOrganismID),
	}

	queryMods = append(queryMods, mods...)

	query := JbrowseTracks(exec, queryMods...)
	queries.SetFrom(query.Query, "\"jbrowse_track\"")

	return query
}
開發者ID:dictyBase,項目名稱:Modware,代碼行數:13,代碼來源:jbrowse_organism.go

示例11: Organism

// Organism pointed to by the foreign key.
func (o *JbrowseOrganism) Organism(exec boil.Executor, mods ...qm.QueryMod) organismQuery {
	queryMods := []qm.QueryMod{
		qm.Where("organism_id=$1", o.OrganismID),
	}

	queryMods = append(queryMods, mods...)

	query := Organisms(exec, queryMods...)
	queries.SetFrom(query.Query, "\"organism\"")

	return query
}
開發者ID:dictyBase,項目名稱:Modware,代碼行數:13,代碼來源:jbrowse_organism.go

示例12: StockpropPub

// StockpropPub pointed to by the foreign key.
func (o *Stockprop) StockpropPub(exec boil.Executor, mods ...qm.QueryMod) stockpropPubQuery {
	queryMods := []qm.QueryMod{
		qm.Where("stockprop_id=$1", o.StockpropID),
	}

	queryMods = append(queryMods, mods...)

	query := StockpropPubs(exec, queryMods...)
	queries.SetFrom(query.Query, "\"stockprop_pub\"")

	return query
}
開發者ID:dictyBase,項目名稱:Modware,代碼行數:13,代碼來源:stockprop.go

示例13: Analysi

// Analysi pointed to by the foreign key.
func (o *Analysisprop) Analysi(exec boil.Executor, mods ...qm.QueryMod) analysiQuery {
	queryMods := []qm.QueryMod{
		qm.Where("analysis_id=$1", o.AnalysisID),
	}

	queryMods = append(queryMods, mods...)

	query := Analyses(exec, queryMods...)
	queries.SetFrom(query.Query, "\"analysis\"")

	return query
}
開發者ID:dictyBase,項目名稱:Modware,代碼行數:13,代碼來源:analysisprop.go

示例14: File

// File pointed to by the foreign key.
func (o *Download) File(exec boil.Executor, mods ...qm.QueryMod) fileQuery {
	queryMods := []qm.QueryMod{
		qm.Where("id=$1", o.FileID),
	}

	queryMods = append(queryMods, mods...)

	query := Files(exec, queryMods...)
	queries.SetFrom(query.Query, "\"files\"")

	return query
}
開發者ID:zqzca,項目名稱:back,代碼行數:13,代碼來源:downloads.go

示例15: Subject

// Subject pointed to by the foreign key.
func (o *UserRelationship) Subject(exec boil.Executor, mods ...qm.QueryMod) cvtermQuery {
	queryMods := []qm.QueryMod{
		qm.Where("cvterm_id=$1", o.SubjectID),
	}

	queryMods = append(queryMods, mods...)

	query := Cvterms(exec, queryMods...)
	queries.SetFrom(query.Query, "\"cvterm\"")

	return query
}
開發者ID:dictyBase,項目名稱:Modware,代碼行數:13,代碼來源:user_relationship.go


注:本文中的github.com/vattle/sqlboiler/queries/qm.Where函數示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。