Documentation ¶
Index ¶
- func Arg(name string) litsql.Argument
- func ArgDefault(name string, defaultValue any) litsql.Argument
- func ArgFunc(fn func() (any, error)) litsql.Argument
- func Build(q litsql.Query, writerOptions ...WriterOption) (string, []any, error)
- func DBArg(name string) litsql.Argument
- func NewWriter(w io.Writer, options ...WriterOption) litsql.Writer
- func ParseArgs(args []any, values ...ArgValues) ([]any, error)
- type ArgValues
- type BuildQuery
- type Builder
- type MapArgValues
- type Mod
- type ModTag
- type ModTagImpl
- type Query
- type QueryMod
- type QueryModApply
- type WriterOption
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ArgDefault ¶ added in v0.3.0
ArgDefault adds a named argument with a default value.
Types ¶
type BuildQuery ¶ added in v0.3.0
type BuildQuery interface {
Build(writerOptions ...WriterOption) (string, []any, error)
}
type Builder ¶
type Builder struct {
// contains filtered or unexported fields
}
func NewQueryBuilder ¶
func (*Builder) Add ¶
func (s *Builder) Add(q litsql.QueryClause)
func (*Builder) ClauseList ¶
func (s *Builder) ClauseList() []litsql.QueryClause
type MapArgValues ¶ added in v0.3.0
MapArgValues is an ArgValues backed from a map[string]any.
type ModTagImpl ¶
type ModTagImpl[T any] struct { }
type Query ¶
type Query[T any] interface { litsql.QueryBuilder litsql.Query QueryModApply[T] BuildQuery }
type QueryMod ¶
type QueryMod[T any] interface { ModTag[T] Apply(qb litsql.QueryBuilder) }
func QueryModFunc ¶
func QueryModFunc[T any](f func(apply litsql.QueryBuilder)) QueryMod[T]
type QueryModApply ¶
type WriterOption ¶ added in v0.3.0
type WriterOption func(*writer)
func WithWriterIndentStr ¶ added in v0.3.0
func WithWriterIndentStr(indentStr string) WriterOption
func WithWriterUseNewLine ¶ added in v0.3.0
func WithWriterUseNewLine(useNewLine bool) WriterOption
Source Files ¶
Click to show internal directories.
Click to hide internal directories.