Exemplo n.º 1
0
Arquivo: database.go Projeto: upper/db
// CompileStatement allows sqladapter to compile the given statement into the
// format MySQL expects.
func (d *database) CompileStatement(stmt *exql.Statement, args []interface{}) (string, []interface{}) {
	return sqlbuilder.Preprocess(stmt.Compile(template), args)
}
Exemplo n.º 2
0
Arquivo: database.go Projeto: upper/db
// CompileStatement allows sqladapter to compile the given statement into the
// format SQLite expects.
func (d *database) CompileStatement(stmt *exql.Statement, args []interface{}) (string, []interface{}) {
	query, args := sqlbuilder.Preprocess(stmt.Compile(template), args)
	return sqladapter.ReplaceWithDollarSign(query), args
}