當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。