createdbtpl

package
v0.0.0-...-ac0725a Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 8, 2023 License: MIT Imports: 12 Imported by: 0

Documentation

Index

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

func Constraint(ctx context.Context) bool

Constraint returns constraint from the context.

func Engine

func Engine(ctx context.Context) string

Engine returns engine from the context.

func Esc

func Esc(ctx context.Context, esc string) bool

Esc returns esc from the context.

func Fmt

func Fmt(ctx context.Context) string

Fmt returns fmt from the context.

func FmtOpts

func FmtOpts(ctx context.Context) []string

FmtOpts returns fmt-opts from the context.

func Lang

func Lang(ctx context.Context) string

Lang returns the sql-formatter language to use from the context based on the context driver.

func TrimComment

func TrimComment(ctx context.Context) bool

TrimComment returns trim-comments from the context.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL