MCPcopy Create free account
hub / github.com/dolthub/doltgresql / callComparisonFunction

Function callComparisonFunction

server/compare/utils.go:139–144  ·  view source on GitHub ↗

callComparisonFunction invokes the binary comparison function for the specified operator |op| with the two arguments |leftLiteral| and |rightLiteral|. The result and any error are returned.

(ctx *sql.Context, op framework.Operator, leftLiteral, rightLiteral sql.Expression)

Source from the content-addressed store, hash-verified

137// callComparisonFunction invokes the binary comparison function for the specified operator |op| with the two arguments
138// |leftLiteral| and |rightLiteral|. The result and any error are returned.
139func callComparisonFunction(ctx *sql.Context, op framework.Operator, leftLiteral, rightLiteral sql.Expression) (result any, err error) {
140 intermediateFunction := framework.GetBinaryFunction(op)
141 compiledFunction := intermediateFunction.Compile(
142 ctx, "_internal_record_comparison_function", leftLiteral, rightLiteral)
143 return compiledFunction.Eval(ctx, nil)
144}

Callers 1

CompareRecordsFunction · 0.85

Calls 3

GetBinaryFunctionFunction · 0.92
CompileMethod · 0.80
EvalMethod · 0.65

Tested by

no test coverage detected