func (q streetTypeQuery) One(ctx context.Context, exec boil.ContextExecutor) (*StreetType, error) {
	o := &StreetType{}

	queries.SetLimit(q.Query, 1)

	err := q.Bind(ctx, exec, 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 street_type")
	}

	if err := o.doAfterSelectHooks(ctx, exec); err != nil {
		return o, err
	}

	return o, nil
}
// One returns a single streetType record from the query.
One returns a single streetType record from the query.
// One returns a single streetType record from the query .
func (q streetTypeQuery) One(ctx context.Context, exec boil.ContextExecutor) (*StreetType, error) {
	o := &StreetType{}
	queries.SetLimit(q.Query, 1)
	err := q.Bind(ctx, exec, 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 street_type")
	}
	if err := o.doAfterSelectHooks(ctx, exec); err != nil {
		return o, err
	}
	return o, nil
}
func ( q streetTypeQuery ) One ( ctx context . Context , exec boil . ContextExecutor ) ( * StreetType , error ) { o := & StreetType { } queries . SetLimit ( q . Query , 1 ) err := q . Bind ( ctx , exec , o ) if err != nil { if errors . Cause ( err ) == sql . ErrNoRows { return nil , sql . ErrNoRows } return nil , errors . Wrap ( err , " " ) } if err := o . doAfterSelectHooks ( ctx , exec ) ; err != nil { return o , err } return o , nil }
One returns a single streetType record from the query.
One returns a single streetType record from the query .