ichain

package
v0.11.5 Latest Latest
Warning

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

Go to latest
Published: Jun 12, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	JoinInnerJoin    = "INNER JOIN"
	JoinLeftJoin     = "LEFT JOIN"
	JoinRightJoin    = "RIGHT JOIN"
	JoinFullJoin     = "FULL JOIN"
	JoinCrossJoin    = "CROSS JOIN"
	JoinStraightJoin = "STRAIGHT_JOIN"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type From added in v0.11.0

type From[T any] interface {
	sq.QueryMod[T]
	As(alias string, columns ...string) From[T]
	Only() From[T]
	Lateral() From[T]
	WithOrdinality() From[T]
}

type FromChain

type FromChain[T, CHAIN any] struct {
	sq.ModTagImpl[T]
	*iclause.From
	Self any
}

func NewFromChain added in v0.11.0

func NewFromChain[T, CHAIN any](chain *FromChain[T, CHAIN]) *FromChain[T, CHAIN]

func (*FromChain[T, CHAIN]) Apply

func (f *FromChain[T, CHAIN]) Apply(a litsql.QueryBuilder)

func (*FromChain[T, CHAIN]) As

func (f *FromChain[T, CHAIN]) As(alias string, columns ...string) CHAIN

func (*FromChain[T, CHAIN]) Lateral

func (f *FromChain[T, CHAIN]) Lateral() CHAIN

func (*FromChain[T, CHAIN]) Only

func (f *FromChain[T, CHAIN]) Only() CHAIN

func (*FromChain[T, CHAIN]) WithOrdinality

func (f *FromChain[T, CHAIN]) WithOrdinality() CHAIN

type GroupBy added in v0.11.0

type GroupBy[T any] interface {
	sq.QueryMod[T]
	Distinct() GroupBy[T]
	With(with string) GroupBy[T]
}

type GroupByChain

type GroupByChain[T, CHAIN any] struct {
	sq.ModTagImpl[T]
	*iclause.GroupBy
	Self any
}

func NewGroupByChain added in v0.11.0

func NewGroupByChain[T, CHAIN any](chain *GroupByChain[T, CHAIN]) *GroupByChain[T, CHAIN]

func (*GroupByChain[T, CHAIN]) Apply

func (c *GroupByChain[T, CHAIN]) Apply(a litsql.QueryBuilder)

func (*GroupByChain[T, CHAIN]) Distinct

func (c *GroupByChain[T, CHAIN]) Distinct() CHAIN

func (*GroupByChain[T, CHAIN]) With

func (c *GroupByChain[T, CHAIN]) With(with string) CHAIN

type InsertConflictUpdate added in v0.11.0

type InsertConflictUpdate[T, UM any] interface {
	sq.QueryMod[T]
	Where(condition string) InsertConflictUpdate[T, UM]
	WhereExpr(condition litsql.Expression) InsertConflictUpdate[T, UM]
	WhereClause(query string, args ...any) InsertConflictUpdate[T, UM]
	DoNothing() InsertConflictUpdate[T, UM]
	DoUpdate(mods ...mod.InsertConflictUpdateMod[T, UM]) InsertConflictUpdate[T, UM]
}

type InsertConflictUpdateChain added in v0.11.0

type InsertConflictUpdateChain[T, CHAIN any] struct {
	sq.ModTagImpl[T]
	*iclause.InsertConflictUpdate
	Self any
}

func NewInsertConflictUpdateChain added in v0.11.0

func NewInsertConflictUpdateChain[T, CHAIN any](chain *InsertConflictUpdateChain[T, CHAIN]) *InsertConflictUpdateChain[T, CHAIN]

func (*InsertConflictUpdateChain[T, CHAIN]) Apply added in v0.11.0

func (f *InsertConflictUpdateChain[T, CHAIN]) Apply(a litsql.QueryBuilder)

func (*InsertConflictUpdateChain[T, CHAIN]) DoNothing added in v0.11.0

func (f *InsertConflictUpdateChain[T, CHAIN]) DoNothing() CHAIN

func (*InsertConflictUpdateChain[T, CHAIN]) DoUpdate added in v0.11.0

func (f *InsertConflictUpdateChain[T, CHAIN]) DoUpdate(mods ...mod.InsertConflictUpdateMod[T, imod.InsertConflictUpdateModTag]) CHAIN

func (*InsertConflictUpdateChain[T, CHAIN]) Where added in v0.11.0

func (f *InsertConflictUpdateChain[T, CHAIN]) Where(condition string) CHAIN

func (*InsertConflictUpdateChain[T, CHAIN]) WhereClause added in v0.11.0

func (f *InsertConflictUpdateChain[T, CHAIN]) WhereClause(query string, args ...any) CHAIN

func (*InsertConflictUpdateChain[T, CHAIN]) WhereExpr added in v0.11.0

func (f *InsertConflictUpdateChain[T, CHAIN]) WhereExpr(condition litsql.Expression) CHAIN

type Join added in v0.11.0

type Join[T any] interface {
	sq.QueryMod[T]
	As(alias string, columns ...string) Join[T]
	Only() Join[T]
	Lateral() Join[T]
	WithOrdinality() Join[T]
	Natural() Join[T]
	On(on string) Join[T]
	OnExpr(on litsql.Expression) Join[T]
	OnClause(query string, args ...any) Join[T]
	Using(using ...string) Join[T]
}

type JoinChain

type JoinChain[T, CHAIN any] struct {
	sq.ModTagImpl[T]
	*iclause.Join
	Self any
}

func NewJoinChain added in v0.11.0

func NewJoinChain[T, CHAIN any](chain *JoinChain[T, CHAIN]) *JoinChain[T, CHAIN]

func (*JoinChain[T, CHAIN]) Apply

func (c *JoinChain[T, CHAIN]) Apply(a litsql.QueryBuilder)

func (*JoinChain[T, CHAIN]) As

func (c *JoinChain[T, CHAIN]) As(alias string, columns ...string) CHAIN

func (*JoinChain[T, CHAIN]) Lateral

func (c *JoinChain[T, CHAIN]) Lateral() CHAIN

func (*JoinChain[T, CHAIN]) Natural

func (c *JoinChain[T, CHAIN]) Natural() CHAIN

func (*JoinChain[T, CHAIN]) On

func (c *JoinChain[T, CHAIN]) On(on string) CHAIN

func (*JoinChain[T, CHAIN]) OnClause added in v0.8.0

func (c *JoinChain[T, CHAIN]) OnClause(query string, args ...any) CHAIN

func (*JoinChain[T, CHAIN]) OnExpr added in v0.8.0

func (c *JoinChain[T, CHAIN]) OnExpr(on litsql.Expression) CHAIN

func (*JoinChain[T, CHAIN]) Only

func (c *JoinChain[T, CHAIN]) Only() CHAIN

func (*JoinChain[T, CHAIN]) Using

func (c *JoinChain[T, CHAIN]) Using(using ...string) CHAIN

func (*JoinChain[T, CHAIN]) WithOrdinality

func (c *JoinChain[T, CHAIN]) WithOrdinality() CHAIN

type Window added in v0.11.0

type Window[T any] interface {
	sq.QueryMod[T]
	From(name string) Window[T]
	PartitionBy(condition ...string) Window[T]
	PartitionByExpr(condition ...litsql.Expression) Window[T]
	OrderBy(order ...string) Window[T]
	OrderByExpr(order ...litsql.Expression) Window[T]
	Range() Window[T]
	Rows() Window[T]
	Groups() Window[T]
	FromUnboundedPreceding() Window[T]
	FromPreceding(exp litsql.Expression) Window[T]
	FromCurrentRow() Window[T]
	FromFollowing(exp litsql.Expression) Window[T]
	ToPreceding(exp litsql.Expression) Window[T]
	ToCurrentRow(count int) Window[T]
	ToFollowing(exp litsql.Expression) Window[T]
	ToUnboundedFollowing() Window[T]
	ExcludeNoOthers() Window[T]
	ExcludeCurrentRow() Window[T]
	ExcludeGroup() Window[T]
	ExcludeTies() Window[T]
}

type WindowChain

type WindowChain[T, CHAIN any] struct {
	sq.ModTagImpl[T]
	*iclause.Windows
	NamedWindow *iclause.NamedWindow
	Self        any
}

func NewWindowChain added in v0.11.0

func NewWindowChain[T, CHAIN any](chain *WindowChain[T, CHAIN]) *WindowChain[T, CHAIN]

func (*WindowChain[T, CHAIN]) Apply

func (f *WindowChain[T, CHAIN]) Apply(a litsql.QueryBuilder)

func (*WindowChain[T, CHAIN]) ExcludeCurrentRow

func (f *WindowChain[T, CHAIN]) ExcludeCurrentRow() CHAIN

func (*WindowChain[T, CHAIN]) ExcludeGroup

func (f *WindowChain[T, CHAIN]) ExcludeGroup() CHAIN

func (*WindowChain[T, CHAIN]) ExcludeNoOthers

func (f *WindowChain[T, CHAIN]) ExcludeNoOthers() CHAIN

func (*WindowChain[T, CHAIN]) ExcludeTies

func (f *WindowChain[T, CHAIN]) ExcludeTies() CHAIN

func (*WindowChain[T, CHAIN]) From

func (f *WindowChain[T, CHAIN]) From(name string) CHAIN

func (*WindowChain[T, CHAIN]) FromCurrentRow

func (f *WindowChain[T, CHAIN]) FromCurrentRow() CHAIN

func (*WindowChain[T, CHAIN]) FromFollowing

func (f *WindowChain[T, CHAIN]) FromFollowing(exp litsql.Expression) CHAIN

func (*WindowChain[T, CHAIN]) FromPreceding

func (f *WindowChain[T, CHAIN]) FromPreceding(exp litsql.Expression) CHAIN

func (*WindowChain[T, CHAIN]) FromUnboundedPreceding

func (f *WindowChain[T, CHAIN]) FromUnboundedPreceding() CHAIN

func (*WindowChain[T, CHAIN]) Groups

func (f *WindowChain[T, CHAIN]) Groups() CHAIN

func (*WindowChain[T, CHAIN]) OrderBy

func (f *WindowChain[T, CHAIN]) OrderBy(order ...string) CHAIN

func (*WindowChain[T, CHAIN]) OrderByExpr added in v0.8.0

func (f *WindowChain[T, CHAIN]) OrderByExpr(order ...litsql.Expression) CHAIN

func (*WindowChain[T, CHAIN]) PartitionBy

func (f *WindowChain[T, CHAIN]) PartitionBy(condition ...string) CHAIN

func (*WindowChain[T, CHAIN]) PartitionByExpr added in v0.8.0

func (f *WindowChain[T, CHAIN]) PartitionByExpr(condition ...litsql.Expression) CHAIN

func (*WindowChain[T, CHAIN]) Range

func (f *WindowChain[T, CHAIN]) Range() CHAIN

func (*WindowChain[T, CHAIN]) Rows

func (f *WindowChain[T, CHAIN]) Rows() CHAIN

func (*WindowChain[T, CHAIN]) ToCurrentRow

func (f *WindowChain[T, CHAIN]) ToCurrentRow(count int) CHAIN

func (*WindowChain[T, CHAIN]) ToFollowing

func (f *WindowChain[T, CHAIN]) ToFollowing(exp litsql.Expression) CHAIN

func (*WindowChain[T, CHAIN]) ToPreceding

func (f *WindowChain[T, CHAIN]) ToPreceding(exp litsql.Expression) CHAIN

func (*WindowChain[T, CHAIN]) ToUnboundedFollowing

func (f *WindowChain[T, CHAIN]) ToUnboundedFollowing() CHAIN

type With added in v0.11.0

type With[T any] interface {
	sq.QueryMod[T]
	Recursive() With[T]
	As(q litsql.Query) With[T]
	NotMaterialized() With[T]
	Materialized() With[T]
	SearchBreadth(setCol string, searchCols ...string) With[T]
	SearchDepth(setCol string, searchCols ...string) With[T]
	Cycle(set, using string, cols ...string) With[T]
	CycleValue(value, defaultVal any) With[T]
}

type WithChain

type WithChain[T, CHAIN any] struct {
	sq.ModTagImpl[T]
	*iclause.With
	CTE  *iclause.CTE
	Self any
}

func NewWithChain added in v0.11.0

func NewWithChain[T, CHAIN any](chain *WithChain[T, CHAIN]) *WithChain[T, CHAIN]

func (*WithChain[T, CHAIN]) Apply

func (c *WithChain[T, CHAIN]) Apply(a litsql.QueryBuilder)

func (*WithChain[T, CHAIN]) As

func (c *WithChain[T, CHAIN]) As(q litsql.Query) CHAIN

func (*WithChain[T, CHAIN]) Cycle

func (c *WithChain[T, CHAIN]) Cycle(set, using string, cols ...string) CHAIN

func (*WithChain[T, CHAIN]) CycleValue

func (c *WithChain[T, CHAIN]) CycleValue(value, defaultVal any) CHAIN

func (*WithChain[T, CHAIN]) Materialized

func (c *WithChain[T, CHAIN]) Materialized() CHAIN

func (*WithChain[T, CHAIN]) NotMaterialized

func (c *WithChain[T, CHAIN]) NotMaterialized() CHAIN

func (*WithChain[T, CHAIN]) Recursive

func (c *WithChain[T, CHAIN]) Recursive() CHAIN

func (*WithChain[T, CHAIN]) SearchBreadth

func (c *WithChain[T, CHAIN]) SearchBreadth(setCol string, searchCols ...string) CHAIN

func (*WithChain[T, CHAIN]) SearchDepth

func (c *WithChain[T, CHAIN]) SearchDepth(setCol string, searchCols ...string) CHAIN

Jump to

Keyboard shortcuts

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