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


Golang queries.GetExecutor函數代碼示例

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


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

示例1: All

// All returns all Tableinfo records from the query.
func (q tableinfoQuery) All() (TableinfoSlice, error) {
	var o TableinfoSlice

	err := q.Bind(&o)
	if err != nil {
		return nil, errors.Wrap(err, "chado: failed to assign all query results to Tableinfo slice")
	}

	if len(tableinfoAfterSelectHooks) != 0 {
		for _, obj := range o {
			if err := obj.doAfterSelectHooks(queries.GetExecutor(q.Query)); err != nil {
				return o, err
			}
		}
	}

	return o, nil
}
開發者ID:dictyBase,項目名稱:Modware,代碼行數:19,代碼來源:tableinfo.go

示例2: All

// All returns all FeaturepropPub records from the query.
func (q featurepropPubQuery) All() (FeaturepropPubSlice, error) {
	var o FeaturepropPubSlice

	err := q.Bind(&o)
	if err != nil {
		return nil, errors.Wrap(err, "chado: failed to assign all query results to FeaturepropPub slice")
	}

	if len(featurepropPubAfterSelectHooks) != 0 {
		for _, obj := range o {
			if err := obj.doAfterSelectHooks(queries.GetExecutor(q.Query)); err != nil {
				return o, err
			}
		}
	}

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

示例3: All

// All returns all Download records from the query.
func (q downloadQuery) All() (DownloadSlice, error) {
	var o DownloadSlice

	err := q.Bind(&o)
	if err != nil {
		return nil, errors.Wrap(err, "models: failed to assign all query results to Download slice")
	}

	if len(downloadAfterSelectHooks) != 0 {
		for _, obj := range o {
			if err := obj.doAfterSelectHooks(queries.GetExecutor(q.Query)); err != nil {
				return o, err
			}
		}
	}

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

示例4: All

// All returns all AuthUserRole records from the query.
func (q authUserRoleQuery) All() (AuthUserRoleSlice, error) {
	var o AuthUserRoleSlice

	err := q.Bind(&o)
	if err != nil {
		return nil, errors.Wrap(err, "chado: failed to assign all query results to AuthUserRole slice")
	}

	if len(authUserRoleAfterSelectHooks) != 0 {
		for _, obj := range o {
			if err := obj.doAfterSelectHooks(queries.GetExecutor(q.Query)); err != nil {
				return o, err
			}
		}
	}

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

示例5: All

// All returns all CvtermDbxref records from the query.
func (q cvtermDbxrefQuery) All() (CvtermDbxrefSlice, error) {
	var o CvtermDbxrefSlice

	err := q.Bind(&o)
	if err != nil {
		return nil, errors.Wrap(err, "chado: failed to assign all query results to CvtermDbxref slice")
	}

	if len(cvtermDbxrefAfterSelectHooks) != 0 {
		for _, obj := range o {
			if err := obj.doAfterSelectHooks(queries.GetExecutor(q.Query)); err != nil {
				return o, err
			}
		}
	}

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

示例6: All

// All returns all Stockcollection records from the query.
func (q stockcollectionQuery) All() (StockcollectionSlice, error) {
	var o StockcollectionSlice

	err := q.Bind(&o)
	if err != nil {
		return nil, errors.Wrap(err, "chado: failed to assign all query results to Stockcollection slice")
	}

	if len(stockcollectionAfterSelectHooks) != 0 {
		for _, obj := range o {
			if err := obj.doAfterSelectHooks(queries.GetExecutor(q.Query)); err != nil {
				return o, err
			}
		}
	}

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

示例7: All

// All returns all PubRelationship records from the query.
func (q pubRelationshipQuery) All() (PubRelationshipSlice, error) {
	var o PubRelationshipSlice

	err := q.Bind(&o)
	if err != nil {
		return nil, errors.Wrap(err, "chado: failed to assign all query results to PubRelationship slice")
	}

	if len(pubRelationshipAfterSelectHooks) != 0 {
		for _, obj := range o {
			if err := obj.doAfterSelectHooks(queries.GetExecutor(q.Query)); err != nil {
				return o, err
			}
		}
	}

	return o, nil
}
開發者ID:dictyBase,項目名稱:Modware,代碼行數:19,代碼來源:pub_relationship.go

示例8: All

// All returns all EnvironmentCvterm records from the query.
func (q environmentCvtermQuery) All() (EnvironmentCvtermSlice, error) {
	var o EnvironmentCvtermSlice

	err := q.Bind(&o)
	if err != nil {
		return nil, errors.Wrap(err, "chado: failed to assign all query results to EnvironmentCvterm slice")
	}

	if len(environmentCvtermAfterSelectHooks) != 0 {
		for _, obj := range o {
			if err := obj.doAfterSelectHooks(queries.GetExecutor(q.Query)); err != nil {
				return o, err
			}
		}
	}

	return o, nil
}
開發者ID:dictyBase,項目名稱:Modware,代碼行數:19,代碼來源:environment_cvterm.go

示例9: All

// All returns all JbrowseOrganism records from the query.
func (q jbrowseOrganismQuery) All() (JbrowseOrganismSlice, error) {
	var o JbrowseOrganismSlice

	err := q.Bind(&o)
	if err != nil {
		return nil, errors.Wrap(err, "chado: failed to assign all query results to JbrowseOrganism slice")
	}

	if len(jbrowseOrganismAfterSelectHooks) != 0 {
		for _, obj := range o {
			if err := obj.doAfterSelectHooks(queries.GetExecutor(q.Query)); err != nil {
				return o, err
			}
		}
	}

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

示例10: One

// One returns a single file record from the query.
func (q fileQuery) One() (*File, error) {
	o := &File{}

	queries.SetLimit(q.Query, 1)

	err := q.Bind(o)
	if err != nil {
		if errors.Cause(err) == sql.ErrNoRows {
			return nil, sql.ErrNoRows
		}
		return nil, errors.Wrap(err, "models: failed to execute a one query for files")
	}

	if err := o.doAfterSelectHooks(queries.GetExecutor(q.Query)); err != nil {
		return o, err
	}

	return o, nil
}
開發者ID:zqzca,項目名稱:back,代碼行數:20,代碼來源:files.go

示例11: One

// One returns a single tableinfo record from the query.
func (q tableinfoQuery) One() (*Tableinfo, error) {
	o := &Tableinfo{}

	queries.SetLimit(q.Query, 1)

	err := q.Bind(o)
	if err != nil {
		if errors.Cause(err) == sql.ErrNoRows {
			return nil, sql.ErrNoRows
		}
		return nil, errors.Wrap(err, "chado: failed to execute a one query for tableinfo")
	}

	if err := o.doAfterSelectHooks(queries.GetExecutor(q.Query)); err != nil {
		return o, err
	}

	return o, nil
}
開發者ID:dictyBase,項目名稱:Modware,代碼行數:20,代碼來源:tableinfo.go

示例12: One

// One returns a single authUserRole record from the query.
func (q authUserRoleQuery) One() (*AuthUserRole, error) {
	o := &AuthUserRole{}

	queries.SetLimit(q.Query, 1)

	err := q.Bind(o)
	if err != nil {
		if errors.Cause(err) == sql.ErrNoRows {
			return nil, sql.ErrNoRows
		}
		return nil, errors.Wrap(err, "chado: failed to execute a one query for auth_user_role")
	}

	if err := o.doAfterSelectHooks(queries.GetExecutor(q.Query)); err != nil {
		return o, err
	}

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

示例13: One

// One returns a single cvtermDbxref record from the query.
func (q cvtermDbxrefQuery) One() (*CvtermDbxref, error) {
	o := &CvtermDbxref{}

	queries.SetLimit(q.Query, 1)

	err := q.Bind(o)
	if err != nil {
		if errors.Cause(err) == sql.ErrNoRows {
			return nil, sql.ErrNoRows
		}
		return nil, errors.Wrap(err, "chado: failed to execute a one query for cvterm_dbxref")
	}

	if err := o.doAfterSelectHooks(queries.GetExecutor(q.Query)); err != nil {
		return o, err
	}

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

示例14: One

// One returns a single featurepropPub record from the query.
func (q featurepropPubQuery) One() (*FeaturepropPub, error) {
	o := &FeaturepropPub{}

	queries.SetLimit(q.Query, 1)

	err := q.Bind(o)
	if err != nil {
		if errors.Cause(err) == sql.ErrNoRows {
			return nil, sql.ErrNoRows
		}
		return nil, errors.Wrap(err, "chado: failed to execute a one query for featureprop_pub")
	}

	if err := o.doAfterSelectHooks(queries.GetExecutor(q.Query)); err != nil {
		return o, err
	}

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

示例15: One

// One returns a single pubRelationship record from the query.
func (q pubRelationshipQuery) One() (*PubRelationship, error) {
	o := &PubRelationship{}

	queries.SetLimit(q.Query, 1)

	err := q.Bind(o)
	if err != nil {
		if errors.Cause(err) == sql.ErrNoRows {
			return nil, sql.ErrNoRows
		}
		return nil, errors.Wrap(err, "chado: failed to execute a one query for pub_relationship")
	}

	if err := o.doAfterSelectHooks(queries.GetExecutor(q.Query)); err != nil {
		return o, err
	}

	return o, nil
}
開發者ID:dictyBase,項目名稱:Modware,代碼行數:20,代碼來源:pub_relationship.go


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