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

Method CompileStatement

adapter/postgresql/database.go:95–104  ·  view source on GitHub ↗
(sess sqladapter.Session, stmt *exql.Statement, args []interface{})

Source from the content-addressed store, hash-verified

93}
94
95func (*database) CompileStatement(sess sqladapter.Session, stmt *exql.Statement, args []interface{}) (string, []interface{}, error) {
96 compiled, err := stmt.Compile(template)
97 if err != nil {
98 return "", nil, err
99 }
100
101 query, args := sqlbuilder.Preprocess(compiled, args)
102 query = string(sqladapter.ReplaceWithDollarSign([]byte(query)))
103 return query, args, nil
104}
105
106func (*database) Err(err error) error {
107 if err != nil {

Callers

nothing calls this directly

Calls 3

PreprocessFunction · 0.92
ReplaceWithDollarSignFunction · 0.92
CompileMethod · 0.65

Tested by

no test coverage detected