当前位置: 首页>>代码示例>>Golang>>正文


Golang builder.Append函数代码示例

本文整理汇总了Golang中github.com/lann/builder.Append函数的典型用法代码示例。如果您正苦于以下问题:Golang Append函数的具体用法?Golang Append怎么用?Golang Append使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了Append函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Golang代码示例。

示例1: Functions

func (b FunctionBuilder) Functions(functions ...FunctionBuilder) FunctionBuilder {
	for _, function := range functions {
		f := function.build()
		b = builder.Append(b, "Functions", f).(FunctionBuilder)
	}
	return b
}
开发者ID:Typeform,项目名称:goblitline,代码行数:7,代码来源:function.go

示例2: Sequence

//############################################################################
func (p beamerBuilder) Sequence(ctxs ...common.TaskCtx) beamerBuilder {
	b := p
	for _, c := range ctxs {
		b = builder.Append(b, "Tasks", c).(beamerBuilder)
	}

	return b
}
开发者ID:denkhaus,项目名称:beamer,代码行数:9,代码来源:beamer.go

示例3: Where

// Where adds WHERE expressions to the query.
//
// See SelectBuilder.Where for more information.
func (b UpdateBuilder) Where(pred interface{}, args ...interface{}) UpdateBuilder {
	return builder.Append(b, "WhereParts", newWherePart(pred, args...)).(UpdateBuilder)
}
开发者ID:nancyandrews,项目名称:MobileMainStreet,代码行数:6,代码来源:update.go

示例4: Set

// Set adds SET clauses to the query.
func (b UpdateBuilder) Set(column string, value interface{}) UpdateBuilder {
	return builder.Append(b, "SetClauses", setClause{column: column, value: value}).(UpdateBuilder)
}
开发者ID:nancyandrews,项目名称:MobileMainStreet,代码行数:4,代码来源:update.go

示例5: Add

func (b unregBuilder) Add(i int) unregBuilder {
	return builder.Append(b, "X", i).(unregBuilder)
}
开发者ID:zenododobird,项目名称:horizon,代码行数:3,代码来源:builder_test.go

示例6: Values

// Values adds a single row's values to the query.
func (b InsertBuilder) Values(values ...interface{}) InsertBuilder {
	return builder.Append(b, "Values", values).(InsertBuilder)
}
开发者ID:zenododobird,项目名称:horizon,代码行数:4,代码来源:insert.go

示例7: Add

func (b simpleExprBuilder) Add(i int) simpleExprBuilder {
	return builder.Append(b, "Adds", i).(simpleExprBuilder)
}
开发者ID:zenododobird,项目名称:horizon,代码行数:3,代码来源:example_test.go

示例8: AddAnswerID

func (b answersReqBuilder) AddAnswerID(v int) answersReqBuilder {
	return builder.Append(b, "AnswerIDS", v).(answersReqBuilder)
}
开发者ID:fun-alex-alex2006hw,项目名称:stk,代码行数:3,代码来源:builders.go

示例9: Where

// Where adds an expression to the WHERE clause of the query.
//
// Expressions are ANDed together in the generated SQL.
//
// Where accepts several types for its pred argument:
//
// nil OR "" - ignored.
//
// string - SQL expression.
// If the expression has SQL placeholders then a set of arguments must be passed
// as well, one for each placeholder.
//
// map[string]interface{} OR Eq - map of SQL expressions to values. Each key is
// transformed into an expression like "<key> = ?", with the corresponding value
// bound to the placeholder. If the value is nil, the expression will be "<key>
// IS NULL". If the value is an array or slice, the expression will be "<key> IN
// (?,?,...)", with one placeholder for each item in the value. These expressions
// are ANDed together.
//
// Where will panic if pred isn't any of the above types.
func (b SelectBuilder) Where(pred interface{}, args ...interface{}) SelectBuilder {
	return builder.Append(b, "WhereParts", newWherePart(pred, args...)).(SelectBuilder)
}
开发者ID:zenododobird,项目名称:horizon,代码行数:23,代码来源:select.go

示例10: JoinClause

// JoinClause adds a join clause to the query.
func (b SelectBuilder) JoinClause(join string) SelectBuilder {
	return builder.Append(b, "Joins", join).(SelectBuilder)
}
开发者ID:zenododobird,项目名称:horizon,代码行数:4,代码来源:select.go

示例11: Column

// Column adds a result column to the query.
// Unlike Columns, Column accepts args which will be bound to placeholders in
// the columns string, for example:
//   Column("IF(col IN ("+squirrel.Placeholders(3)+"), 1, 0) as col", 1, 2, 3)
func (b SelectBuilder) Column(column interface{}, args ...interface{}) SelectBuilder {
	return builder.Append(b, "Columns", newPart(column, args...)).(SelectBuilder)
}
开发者ID:zenododobird,项目名称:horizon,代码行数:7,代码来源:select.go

示例12: JoinClause

// JoinClause adds a join clause to the query.
func (b SelectBuilder) JoinClause(pred interface{}, args ...interface{}) SelectBuilder {
	return builder.Append(b, "Joins", newPart(pred, args...)).(SelectBuilder)
}
开发者ID:stellar,项目名称:bridge-server,代码行数:4,代码来源:select.go

示例13: Prepare

func (rb ruleBuilder) Prepare(cb PrepareCallback) ruleBuilder {
	return builder.Append(rb, "Prepares", cb).(ruleBuilder)
}
开发者ID:joslinm,项目名称:validate,代码行数:3,代码来源:rule_builder.go

示例14: Alter

func (rb ruleBuilder) Alter(cb AlterCallback) ruleBuilder {
	return builder.Append(rb, "Alters", cb).(ruleBuilder)
}
开发者ID:joslinm,项目名称:validate,代码行数:3,代码来源:rule_builder.go

示例15: Custom

// callback
func (rb ruleBuilder) Custom(cb CustomCallback) ruleBuilder {
	return builder.Append(rb, "Customs", cb).(ruleBuilder)
}
开发者ID:joslinm,项目名称:validate,代码行数:4,代码来源:rule_builder.go


注:本文中的github.com/lann/builder.Append函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。