MCPcopy
hub / github.com/dropbox/godropbox / Literal

Function Literal

database/sqlbuilder/expression.go:368–374  ·  view source on GitHub ↗

Returns an escaped literal string

(v interface{})

Source from the content-addressed store, hash-verified

366
367// Returns an escaped literal string
368func Literal(v interface{}) Expression {
369 value, err := sqltypes.BuildValue(v)
370 if err != nil {
371 panic(errors.Wrap(err, "Invalid literal value"))
372 }
373 return &literalExpression{value: value}
374}
375
376// Returns a representation of "c[0] AND ... AND c[n-1]" for c in clauses
377func And(expressions ...BoolExpression) BoolExpression {

Callers 15

TestTupleExprMethod · 0.85
TestAddExprMethod · 0.85
TestSubExprMethod · 0.85
TestMulExprMethod · 0.85
TestDivExprMethod · 0.85
TestBitwiseOrMethod · 0.85
TestBitwiseAndMethod · 0.85
TestBitwiseXorMethod · 0.85
TestPlusMethod · 0.85
TestMinusMethod · 0.85
LikeLFunction · 0.85
RegexpLFunction · 0.85

Calls 2

BuildValueFunction · 0.92
WrapFunction · 0.92

Tested by 15

TestTupleExprMethod · 0.68
TestAddExprMethod · 0.68
TestSubExprMethod · 0.68
TestMulExprMethod · 0.68
TestDivExprMethod · 0.68
TestBitwiseOrMethod · 0.68
TestBitwiseAndMethod · 0.68
TestBitwiseXorMethod · 0.68
TestPlusMethod · 0.68
TestMinusMethod · 0.68
TestInsertNilColumnMethod · 0.68
TestInsertSingleValueMethod · 0.68