Documentation ¶
Index ¶
- Constants
- Variables
- func Constraint(ctx context.Context) bool
- func Engine(ctx context.Context) string
- func Esc(ctx context.Context, esc string) bool
- func Fmt(ctx context.Context) string
- func FmtOpts(ctx context.Context) []string
- func Lang(ctx context.Context) string
- func TrimComment(ctx context.Context) bool
Constants ¶
View Source
const ( FmtKey xo.ContextKey = "fmt" FmtOptsKey xo.ContextKey = "fmt-opts" ConstraintKey xo.ContextKey = "constraint" EscKey xo.ContextKey = "escape" EngineKey xo.ContextKey = "engine" TrimCommentKey xo.ContextKey = "trim-comment" )
Context keys.
Variables ¶
View Source
var Files embed.FS
Files are the embedded SQL templates.
Functions ¶
func Constraint ¶
Constraint returns constraint from the context.
func Lang ¶
Lang returns the sql-formatter language to use from the context based on the context driver.
func TrimComment ¶
TrimComment returns trim-comments from the context.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.