shared/generate/db/stmt.go
func (s *Stmt) register(buf *file.Buffer, sql string, filters ...string) {
	kind := strings.Replace(s.kind, "-", "_", -1)
	if kind == "id" {
		kind = "ID" // silence go lints
	}
	buf.L("var %s = %s.RegisterStmt(`\n%s\n`)", stmtCodeVar(s.entity, kind, filters...), s.db, sql)
}
func (s *Stmt) register(buf *file.Buffer, sql string, filters ...string) {
	kind := strings.Replace(s.kind, "-", "_", -1)
	if kind == "id" {
		kind = "ID" // silence go lints
	}
	buf.L("var %s = %s.RegisterStmt(`\n%s\n`)", stmtCodeVar(s.entity, kind, filters...), s.db, sql)
}
func ( s * Stmt ) register ( buf * file . Buffer , sql string , filters ... string ) { kind := strings . Replace ( s . kind , " " , " " , - 1 ) if kind == " " { kind = " " // silence go lints } buf . L ( " \n \n " , stmtCodeVar ( s . entity , kind , filters ... ) , s . db , sql ) }
// Output a line of code that registers the given statement and declares the
// associated statement code global variable.
Output a line of code that registers the given statement and declares the associated statement code global variable .