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

Function Eq

database/sqlbuilder/expression.go:441–447  ·  view source on GitHub ↗

Returns a representation of "a=b"

(lhs, rhs Expression)

Source from the content-addressed store, hash-verified

439
440// Returns a representation of "a=b"
441func Eq(lhs, rhs Expression) BoolExpression {
442 lit, ok := rhs.(*literalExpression)
443 if ok && sqltypes.Value(lit.value).IsNull() {
444 return newBoolExpression(lhs, rhs, []byte(" IS "))
445 }
446 return newBoolExpression(lhs, rhs, []byte("="))
447}
448
449// Returns a representation of "a=b", where b is a literal
450func EqL(lhs Expression, val interface{}) BoolExpression {

Callers 10

TestInnerJoinMethod · 0.85
TestLeftJoinMethod · 0.85
TestRightJoinMethod · 0.85
TestJoinColumnsMethod · 0.85
TestNestedInnerJoinMethod · 0.85
TestNestedLeftJoinMethod · 0.85
TestNestedRightJoinMethod · 0.85
EqLFunction · 0.85
TestSelectOnJoinMethod · 0.85
ExampleFunction · 0.85

Calls 3

ValueStruct · 0.92
newBoolExpressionFunction · 0.85
IsNullMethod · 0.80

Tested by 9

TestInnerJoinMethod · 0.68
TestLeftJoinMethod · 0.68
TestRightJoinMethod · 0.68
TestJoinColumnsMethod · 0.68
TestNestedInnerJoinMethod · 0.68
TestNestedLeftJoinMethod · 0.68
TestNestedRightJoinMethod · 0.68
TestSelectOnJoinMethod · 0.68
ExampleFunction · 0.68