MCPcopy
hub / github.com/Masterminds/squirrel / Expr

Function Expr

expr.go:27–29  ·  view source on GitHub ↗

Expr builds an expression from a SQL fragment and arguments. Ex: Expr("FROM_UNIXTIME(?)", t)

(sql string, args ...interface{})

Source from the content-addressed store, hash-verified

25// Ex:
26// Expr("FROM_UNIXTIME(?)", t)
27func Expr(sql string, args ...interface{}) Sqlizer {
28 return expr{sql: sql, args: args}
29}
30
31func (e expr) ToSql() (sql string, args []interface{}, err error) {
32 simple := true

Callers 15

TestInsertBuilderToSqlFunction · 0.85
PrefixMethod · 0.85
SuffixMethod · 0.85
TestDebugSqlizerFunction · 0.85
TestDebugSqlizerErrorsFunction · 0.85
PrefixMethod · 0.85
SuffixMethod · 0.85
TestUpdateBuilderToSqlFunction · 0.85
TestConcatExprFunction · 0.85
TestExprEscapedFunction · 0.85
TestExprRecursionFunction · 0.85
TestSelectBuilderToSqlFunction · 0.85

Calls

no outgoing calls

Tested by 12

TestInsertBuilderToSqlFunction · 0.68
TestDebugSqlizerFunction · 0.68
TestDebugSqlizerErrorsFunction · 0.68
TestUpdateBuilderToSqlFunction · 0.68
TestConcatExprFunction · 0.68
TestExprEscapedFunction · 0.68
TestExprRecursionFunction · 0.68
TestSelectBuilderToSqlFunction · 0.68
TestCaseWithValFunction · 0.68
TestCaseWithNoValFunction · 0.68
TestCaseWithExprFunction · 0.68
TestMultipleCaseFunction · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…