Documentation ¶
Index ¶
- Variables
- func BKA[Q hintable](tables ...string) bob.Mod[Q]
- func BNL[Q hintable](tables ...string) bob.Mod[Q]
- func CrossJoin[Q Joinable](e any) bob.Mod[Q]
- func DerivedConditionPushdown[Q hintable](tables ...string) bob.Mod[Q]
- func GroupIndex[Q hintable](tables ...string) bob.Mod[Q]
- func HashJoin[Q hintable](tables ...string) bob.Mod[Q]
- func Index[Q hintable](tables ...string) bob.Mod[Q]
- func IndexMerge[Q hintable](tables ...string) bob.Mod[Q]
- func JoinFixedOrder[Q hintable](name string) bob.Mod[Q]
- func JoinIndex[Q hintable](tables ...string) bob.Mod[Q]
- func JoinOrder[Q hintable](tables ...string) bob.Mod[Q]
- func JoinPrefix[Q hintable](tables ...string) bob.Mod[Q]
- func JoinSuffix[Q hintable](tables ...string) bob.Mod[Q]
- func MRR[Q hintable](tables ...string) bob.Mod[Q]
- func MaxExecutionTime[Q hintable](n int) bob.Mod[Q]
- func Merge[Q hintable](tables ...string) bob.Mod[Q]
- func NoBKA[Q hintable](tables ...string) bob.Mod[Q]
- func NoBNL[Q hintable](tables ...string) bob.Mod[Q]
- func NoDerivedConditionPushdown[Q hintable](tables ...string) bob.Mod[Q]
- func NoGroupIndex[Q hintable](tables ...string) bob.Mod[Q]
- func NoHashJoin[Q hintable](tables ...string) bob.Mod[Q]
- func NoICP[Q hintable](tables ...string) bob.Mod[Q]
- func NoIndex[Q hintable](tables ...string) bob.Mod[Q]
- func NoIndexMerge[Q hintable](tables ...string) bob.Mod[Q]
- func NoJoinIndex[Q hintable](tables ...string) bob.Mod[Q]
- func NoMRR[Q hintable](tables ...string) bob.Mod[Q]
- func NoMerge[Q hintable](tables ...string) bob.Mod[Q]
- func NoOrderIndex[Q hintable](tables ...string) bob.Mod[Q]
- func NoRangeOptimazation[Q hintable](tables ...string) bob.Mod[Q]
- func NoSemijoin[Q hintable](strategy ...string) bob.Mod[Q]
- func NoSkipScan[Q hintable](tables ...string) bob.Mod[Q]
- func OrderIndex[Q hintable](tables ...string) bob.Mod[Q]
- func Partition[Q interface{ ... }](partitions ...string) bob.Mod[Q]
- func QBName[Q hintable](name string) bob.Mod[Q]
- func ResourceGroup[Q hintable](name string) bob.Mod[Q]
- func Semijoin[Q hintable](strategy ...string) bob.Mod[Q]
- func SetVar[Q hintable](statement string) bob.Mod[Q]
- func SkipScan[Q hintable](tables ...string) bob.Mod[Q]
- func StraightJoin[Q Joinable](e any) bob.Mod[Q]
- func Subquery[Q hintable](strategy string) bob.Mod[Q]
- type CTEChain
- type DeleteQuery
- type Expression
- type FromChain
- func (f FromChain[Q]) Apply(q Q)
- func (f FromChain[Q]) As(alias string, columns ...string) FromChain[Q]
- func (f FromChain[Q]) ForceIndex(first string, others ...string) FromChain[Q]
- func (f FromChain[Q]) ForceIndexForGroupBy(first string, others ...string) FromChain[Q]
- func (f FromChain[Q]) ForceIndexForJoin(first string, others ...string) FromChain[Q]
- func (f FromChain[Q]) ForceIndexForOrderBy(first string, others ...string) FromChain[Q]
- func (f FromChain[Q]) IgnoreIndex(first string, others ...string) FromChain[Q]
- func (f FromChain[Q]) IgnoreIndexForGroupBy(first string, others ...string) FromChain[Q]
- func (f FromChain[Q]) IgnoreIndexForJoin(first string, others ...string) FromChain[Q]
- func (f FromChain[Q]) IgnoreIndexForOrderBy(first string, others ...string) FromChain[Q]
- func (f FromChain[Q]) Lateral() FromChain[Q]
- func (f FromChain[Q]) Partition(partitions ...string) FromChain[Q]
- func (f FromChain[Q]) UseIndex(first string, others ...string) FromChain[Q]
- func (f FromChain[Q]) UseIndexForGroupBy(first string, others ...string) FromChain[Q]
- func (f FromChain[Q]) UseIndexForJoin(first string, others ...string) FromChain[Q]
- func (f FromChain[Q]) UseIndexForOrderBy(first string, others ...string) FromChain[Q]
- type Function
- type IndexHintChain
- type InsertQuery
- type JoinChain
- func (j JoinChain[Q]) Apply(q Q)
- func (f JoinChain[Q]) As(alias string, columns ...string) JoinChain[Q]
- func (f JoinChain[Q]) Lateral() JoinChain[Q]
- func (j JoinChain[Q]) Natural() bob.Mod[Q]
- func (j JoinChain[Q]) On(on ...bob.Expression) bob.Mod[Q]
- func (j JoinChain[Q]) OnEQ(a, b bob.Expression) bob.Mod[Q]
- func (f JoinChain[Q]) Partition(partitions ...string) JoinChain[Q]
- func (j JoinChain[Q]) Using(using ...string) bob.Mod[Q]
- type Joinable
- type LockChain
- type OrderBy
- type SelectQuery
- type Set
- type UpdateQuery
- type WindowChain
- func (w *WindowChain[T]) From(name string) T
- func (w *WindowChain[T]) FromCurrentRow() T
- func (w *WindowChain[T]) FromFollowing(exp any) T
- func (w *WindowChain[T]) FromPreceding(exp any) T
- func (w *WindowChain[T]) FromUnboundedPreceding() T
- func (w *WindowChain[T]) OrderBy(order ...any) T
- func (w *WindowChain[T]) PartitionBy(condition ...any) T
- func (w *WindowChain[T]) Range() T
- func (w *WindowChain[T]) Rows() T
- func (w *WindowChain[T]) ToCurrentRow(count int) T
- func (w *WindowChain[T]) ToFollowing(exp any) T
- func (w *WindowChain[T]) ToPreceding(exp any) T
- func (w *WindowChain[T]) ToUnboundedFollowing() T
- type WindowMod
Constants ¶
This section is empty.
Variables ¶
View Source
var (
Dialect dialect
)
Functions ¶
func GroupIndex ¶
func IndexMerge ¶
func JoinFixedOrder ¶
func JoinPrefix ¶
func JoinSuffix ¶
func MaxExecutionTime ¶
func NoGroupIndex ¶
func NoHashJoin ¶
func NoIndexMerge ¶
func NoJoinIndex ¶
func NoOrderIndex ¶
func NoRangeOptimazation ¶
func NoSemijoin ¶
func NoSkipScan ¶
func OrderIndex ¶
func ResourceGroup ¶
Types ¶
type DeleteQuery ¶ added in v0.15.0
type DeleteQuery struct { clause.With Tables []clause.Table clause.From clause.Where clause.OrderBy clause.Limit // contains filtered or unexported fields }
Trying to represent the query structure as documented in https://dev.mysql.com/doc/refman/8.0/en/delete.html
func (*DeleteQuery) AppendHint ¶ added in v0.15.0
func (h *DeleteQuery) AppendHint(hint string)
func (*DeleteQuery) AppendModifier ¶ added in v0.15.0
func (h *DeleteQuery) AppendModifier(modifier T)
type Expression ¶
type Expression struct { expr.Chain[Expression, Expression] }
func (Expression) New ¶
func (Expression) New(exp bob.Expression) Expression
type FromChain ¶ added in v0.7.0
func (FromChain[Q]) ForceIndex ¶ added in v0.7.0
func (FromChain[Q]) ForceIndexForGroupBy ¶ added in v0.7.0
func (FromChain[Q]) ForceIndexForJoin ¶ added in v0.7.0
func (FromChain[Q]) ForceIndexForOrderBy ¶ added in v0.7.0
func (FromChain[Q]) IgnoreIndex ¶ added in v0.7.0
func (FromChain[Q]) IgnoreIndexForGroupBy ¶ added in v0.7.0
func (FromChain[Q]) IgnoreIndexForJoin ¶ added in v0.7.0
func (FromChain[Q]) IgnoreIndexForOrderBy ¶ added in v0.7.0
func (FromChain[Q]) UseIndexForGroupBy ¶ added in v0.7.0
func (FromChain[Q]) UseIndexForJoin ¶ added in v0.7.0
type Function ¶
type Function struct { // For chain methods expr.Chain[Expression, Expression] // contains filtered or unexported fields }
func NewFunction ¶
type IndexHintChain ¶
type IndexHintChain[Q interface{ AppendIndexHint(clause.IndexHint) }] struct { // contains filtered or unexported fields }
func (*IndexHintChain[Q]) Apply ¶
func (i *IndexHintChain[Q]) Apply(q Q)
func (*IndexHintChain[Q]) ForGroupBy ¶
func (i *IndexHintChain[Q]) ForGroupBy() *IndexHintChain[Q]
func (*IndexHintChain[Q]) ForJoin ¶
func (i *IndexHintChain[Q]) ForJoin() *IndexHintChain[Q]
func (*IndexHintChain[Q]) ForOrderBy ¶
func (i *IndexHintChain[Q]) ForOrderBy() *IndexHintChain[Q]
type InsertQuery ¶ added in v0.15.0
type InsertQuery struct { clause.Values Table any Columns []string RowAlias string ColumnAlias []string Sets []Set DuplicateKeyUpdate clause.Set // contains filtered or unexported fields }
Trying to represent the query structure as documented in https://dev.mysql.com/doc/refman/8.0/en/insert.html
func (*InsertQuery) AppendHint ¶ added in v0.15.0
func (h *InsertQuery) AppendHint(hint string)
func (*InsertQuery) AppendModifier ¶ added in v0.15.0
func (h *InsertQuery) AppendModifier(modifier T)
func (*InsertQuery) AppendPartition ¶ added in v0.15.0
func (h *InsertQuery) AppendPartition(partitions ...string)
type LockChain ¶
func (LockChain[Q]) SkipLocked ¶
type SelectQuery ¶ added in v0.15.0
type SelectQuery struct { clause.With clause.SelectList clause.From clause.Where clause.GroupBy clause.Having clause.Windows clause.Combine clause.OrderBy clause.Limit clause.Offset clause.For bob.Load[*SelectQuery] // contains filtered or unexported fields }
Trying to represent the query structure as documented in https://dev.mysql.com/doc/refman/8.0/en/select.html
func (*SelectQuery) AppendHint ¶ added in v0.15.0
func (h *SelectQuery) AppendHint(hint string)
func (*SelectQuery) AppendModifier ¶ added in v0.15.0
func (h *SelectQuery) AppendModifier(modifier T)
func (*SelectQuery) SetInto ¶ added in v0.15.0
func (s *SelectQuery) SetInto(i any)
type UpdateQuery ¶ added in v0.15.0
type UpdateQuery struct { clause.With clause.Set clause.From clause.Where clause.OrderBy clause.Limit // contains filtered or unexported fields }
Trying to represent the select query structure as documented in https://www.postgresql.org/docs/current/sql-update.html
func (*UpdateQuery) AppendHint ¶ added in v0.15.0
func (h *UpdateQuery) AppendHint(hint string)
func (*UpdateQuery) AppendModifier ¶ added in v0.15.0
func (h *UpdateQuery) AppendModifier(modifier T)
type WindowChain ¶
type WindowChain[T any] struct { Wrap T // contains filtered or unexported fields }
func (*WindowChain[T]) From ¶
func (w *WindowChain[T]) From(name string) T
func (*WindowChain[T]) FromCurrentRow ¶
func (w *WindowChain[T]) FromCurrentRow() T
func (*WindowChain[T]) FromFollowing ¶
func (w *WindowChain[T]) FromFollowing(exp any) T
func (*WindowChain[T]) FromPreceding ¶
func (w *WindowChain[T]) FromPreceding(exp any) T
func (*WindowChain[T]) FromUnboundedPreceding ¶
func (w *WindowChain[T]) FromUnboundedPreceding() T
func (*WindowChain[T]) OrderBy ¶
func (w *WindowChain[T]) OrderBy(order ...any) T
func (*WindowChain[T]) PartitionBy ¶
func (w *WindowChain[T]) PartitionBy(condition ...any) T
func (*WindowChain[T]) Range ¶
func (w *WindowChain[T]) Range() T
func (*WindowChain[T]) Rows ¶
func (w *WindowChain[T]) Rows() T
func (*WindowChain[T]) ToCurrentRow ¶
func (w *WindowChain[T]) ToCurrentRow(count int) T
func (*WindowChain[T]) ToFollowing ¶
func (w *WindowChain[T]) ToFollowing(exp any) T
func (*WindowChain[T]) ToPreceding ¶
func (w *WindowChain[T]) ToPreceding(exp any) T
func (*WindowChain[T]) ToUnboundedFollowing ¶
func (w *WindowChain[T]) ToUnboundedFollowing() T
type WindowMod ¶
type WindowMod[Q interface{ AppendWindow(clause.NamedWindow) }] struct { Name string *WindowChain[*WindowMod[Q]] }
Click to show internal directories.
Click to hide internal directories.