MCPcopy Index your code
hub / github.com/upper/db / Preprocess

Function Preprocess

internal/sqlbuilder/convert.go:163–166  ·  view source on GitHub ↗

Preprocess expands arguments that needs to be expanded and compiles a query into a single string.

(in string, args []interface{})

Source from the content-addressed store, hash-verified

161// Preprocess expands arguments that needs to be expanded and compiles a query
162// into a single string.
163func Preprocess(in string, args []interface{}) (string, []interface{}) {
164 b, args := expandQuery([]byte(in), args)
165 return string(b), args
166}

Callers 15

compileStatementMethod · 0.92
CompileStatementMethod · 0.92
CompileStatementMethod · 0.92
CompileStatementMethod · 0.92
TestSelectFunction · 0.85
TestPlaceholderSimpleFunction · 0.85
TestPlaceholderManyFunction · 0.85
TestPlaceholderArrayFunction · 0.85
TestPlaceholderArgumentsFunction · 0.85
TestPlaceholderReplaceFunction · 0.85
columnFragmentsFunction · 0.85
toWhereWithArgumentsMethod · 0.85

Calls 1

expandQueryFunction · 0.85

Tested by 6

TestSelectFunction · 0.68
TestPlaceholderSimpleFunction · 0.68
TestPlaceholderManyFunction · 0.68
TestPlaceholderArrayFunction · 0.68
TestPlaceholderArgumentsFunction · 0.68
TestPlaceholderReplaceFunction · 0.68