コード例 #1
0
ファイル: tableinfo.go プロジェクト: dictyBase/Modware
// 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
}
コード例 #2
0
ファイル: featureprop_pub.go プロジェクト: dictyBase/Modware
// 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
}
コード例 #3
0
ファイル: downloads.go プロジェクト: zqzca/back
// 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
}
コード例 #4
0
ファイル: auth_user_role.go プロジェクト: dictyBase/Modware
// 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
}
コード例 #5
0
ファイル: cvterm_dbxref.go プロジェクト: dictyBase/Modware
// 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
}
コード例 #6
0
ファイル: stockcollection.go プロジェクト: dictyBase/Modware
// 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
}
コード例 #7
0
ファイル: pub_relationship.go プロジェクト: dictyBase/Modware
// 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
}
コード例 #8
0
// 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
}
コード例 #9
0
ファイル: jbrowse_organism.go プロジェクト: dictyBase/Modware
// 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
}
コード例 #10
0
ファイル: files.go プロジェクト: zqzca/back
// 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
}
コード例 #11
0
ファイル: tableinfo.go プロジェクト: dictyBase/Modware
// 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
}
コード例 #12
0
ファイル: auth_user_role.go プロジェクト: dictyBase/Modware
// 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
}
コード例 #13
0
ファイル: cvterm_dbxref.go プロジェクト: dictyBase/Modware
// 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
}
コード例 #14
0
ファイル: featureprop_pub.go プロジェクト: dictyBase/Modware
// 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
}
コード例 #15
0
ファイル: pub_relationship.go プロジェクト: dictyBase/Modware
// 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
}
コード例 #16
0
ファイル: phenstatement.go プロジェクト: dictyBase/Modware
// One returns a single phenstatement record from the query.
func (q phenstatementQuery) One() (*Phenstatement, error) {
	o := &Phenstatement{}

	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 phenstatement")
	}

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

	return o, nil
}
コード例 #17
0
ファイル: jbrowse_organism.go プロジェクト: dictyBase/Modware
// One returns a single jbrowseOrganism record from the query.
func (q jbrowseOrganismQuery) One() (*JbrowseOrganism, error) {
	o := &JbrowseOrganism{}

	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 jbrowse_organism")
	}

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

	return o, nil
}
コード例 #18
0
// One returns a single stockRelationshipCvterm record from the query.
func (q stockRelationshipCvtermQuery) One() (*StockRelationshipCvterm, error) {
	o := &StockRelationshipCvterm{}

	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 stock_relationship_cvterm")
	}

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

	return o, nil
}
コード例 #19
0
ファイル: stock_item_order.go プロジェクト: dictyBase/Modware
// One returns a single stockItemOrder record from the query.
func (q stockItemOrderQuery) One() (*StockItemOrder, error) {
	o := &StockItemOrder{}

	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 stock_item_order")
	}

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

	return o, nil
}