This commit is contained in:
2026-08-26 11:01:46 +03:00
parent 34a798d345
commit 4bd1512994
712 changed files with 538122 additions and 0 deletions
+22
View File
@@ -0,0 +1,22 @@
package dbr
// Builder builds SQL in Dialect like MySQL, and PostgreSQL.
// The raw SQL and values are stored in Buffer.
//
// The core of gocraft/dbr is interpolation, which can expand ? with arbitrary SQL.
// If you need a feature that is not currently supported, you can build it
// on your own (or use Expr).
//
// To do that, the value that you wish to be expanded with ? needs to
// implement Builder.
type Builder interface {
Build(Dialect, Buffer) error
}
// BuildFunc implements Builder.
type BuildFunc func(Dialect, Buffer) error
// Build calls itself to build SQL.
func (b BuildFunc) Build(d Dialect, buf Buffer) error {
return b(d, buf)
}