本文整理汇总了Golang中github.com/vattle/sqlboiler/queries.SetLimit函数的典型用法代码示例。如果您正苦于以下问题:Golang SetLimit函数的具体用法?Golang SetLimit怎么用?Golang SetLimit使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了SetLimit函数的18个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Golang代码示例。
示例1: Exists
// Exists checks if the row exists in the table.
func (q contactRelationshipQuery) Exists() (bool, error) {
var count int64
queries.SetCount(q.Query)
queries.SetLimit(q.Query, 1)
err := q.Query.QueryRow().Scan(&count)
if err != nil {
return false, errors.Wrap(err, "chado: failed to check if contact_relationship exists")
}
return count > 0, nil
}
开发者ID:dictyBase,项目名称:Modware,代码行数:14,代码来源:contact_relationship.go
示例2: Exists
// Exists checks if the row exists in the table.
func (q featurepropPubQuery) Exists() (bool, error) {
var count int64
queries.SetCount(q.Query)
queries.SetLimit(q.Query, 1)
err := q.Query.QueryRow().Scan(&count)
if err != nil {
return false, errors.Wrap(err, "chado: failed to check if featureprop_pub exists")
}
return count > 0, nil
}
开发者ID:dictyBase,项目名称:Modware,代码行数:14,代码来源:featureprop_pub.go
示例3: Exists
// Exists checks if the row exists in the table.
func (q phenotypeComparisonCvtermQuery) Exists() (bool, error) {
var count int64
queries.SetCount(q.Query)
queries.SetLimit(q.Query, 1)
err := q.Query.QueryRow().Scan(&count)
if err != nil {
return false, errors.Wrap(err, "chado: failed to check if phenotype_comparison_cvterm exists")
}
return count > 0, nil
}
开发者ID:dictyBase,项目名称:Modware,代码行数:14,代码来源:phenotype_comparison_cvterm.go
示例4: Exists
// Exists checks if the row exists in the table.
func (q authUserRoleQuery) Exists() (bool, error) {
var count int64
queries.SetCount(q.Query)
queries.SetLimit(q.Query, 1)
err := q.Query.QueryRow().Scan(&count)
if err != nil {
return false, errors.Wrap(err, "chado: failed to check if auth_user_role exists")
}
return count > 0, nil
}
开发者ID:dictyBase,项目名称:Modware,代码行数:14,代码来源:auth_user_role.go
示例5: Exists
// Exists checks if the row exists in the table.
func (q cvtermDbxrefQuery) Exists() (bool, error) {
var count int64
queries.SetCount(q.Query)
queries.SetLimit(q.Query, 1)
err := q.Query.QueryRow().Scan(&count)
if err != nil {
return false, errors.Wrap(err, "chado: failed to check if cvterm_dbxref exists")
}
return count > 0, nil
}
开发者ID:dictyBase,项目名称:Modware,代码行数:14,代码来源:cvterm_dbxref.go
示例6: Exists
// Exists checks if the row exists in the table.
func (q stockcollectionQuery) Exists() (bool, error) {
var count int64
queries.SetCount(q.Query)
queries.SetLimit(q.Query, 1)
err := q.Query.QueryRow().Scan(&count)
if err != nil {
return false, errors.Wrap(err, "chado: failed to check if stockcollection exists")
}
return count > 0, nil
}
开发者ID:dictyBase,项目名称:Modware,代码行数:14,代码来源:stockcollection.go
示例7: Exists
// Exists checks if the row exists in the table.
func (q fileQuery) Exists() (bool, error) {
var count int64
queries.SetCount(q.Query)
queries.SetLimit(q.Query, 1)
err := q.Query.QueryRow().Scan(&count)
if err != nil {
return false, errors.Wrap(err, "models: failed to check if files exists")
}
return count > 0, nil
}
开发者ID:zqzca,项目名称:back,代码行数:14,代码来源:files.go
示例8: Exists
// Exists checks if the row exists in the table.
func (q jbrowseOrganismQuery) Exists() (bool, error) {
var count int64
queries.SetCount(q.Query)
queries.SetLimit(q.Query, 1)
err := q.Query.QueryRow().Scan(&count)
if err != nil {
return false, errors.Wrap(err, "chado: failed to check if jbrowse_organism exists")
}
return count > 0, nil
}
开发者ID:dictyBase,项目名称:Modware,代码行数:14,代码来源:jbrowse_organism.go
示例9: One
// 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
}
开发者ID:dictyBase,项目名称:Modware,代码行数:20,代码来源:stock_relationship_cvterm.go
示例10: 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
示例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 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
}
开发者ID:dictyBase,项目名称:Modware,代码行数:20,代码来源:stock_item_order.go
示例15: 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
示例16: 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
示例17: One
// 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
}
开发者ID:dictyBase,项目名称:Modware,代码行数:20,代码来源:phenstatement.go
示例18: One
// 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
}
开发者ID:dictyBase,项目名称:Modware,代码行数:20,代码来源:jbrowse_organism.go
注:本文中的github.com/vattle/sqlboiler/queries.SetLimit函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论