Documentation ¶
Index ¶
- type ConflictClause
- func (c *ConflictClause[T]) AndWhere(args ...any) T
- func (c *ConflictClause[T]) BuildConflict() T
- func (c *ConflictClause[T]) CleanConflict() T
- func (c *ConflictClause[T]) CopyConflict(self T) *ConflictClause[T]
- func (c *ConflictClause[T]) DoNothing() T
- func (c *ConflictClause[T]) DoUpdate(column any, args ...any) T
- func (c *ConflictClause[T]) DoUpdateWithCondition(column any, valueOrAssignmentPredicate any, args ...any) T
- func (c *ConflictClause[T]) OnConflict(args ...any) T
- func (c *ConflictClause[T]) OnConflictDoNothing(args ...any) T
- func (c *ConflictClause[T]) OnConflictDoUpdate(indexColumn any, column any, args ...any) T
- func (c *ConflictClause[T]) OnConstraint(indexConstraint string) T
- func (c *ConflictClause[T]) OrWhere(args ...any) T
- func (c *ConflictClause[T]) Where(args ...any) T
- type DeleteClause
- type InsertClause
- type JoinClause
- func (j *JoinClause[T]) CopyJoin(self T) *JoinClause[T]
- func (j *JoinClause[T]) FullJoin(table any, args ...any) T
- func (j *JoinClause[T]) FullOuterJoin(table any, args ...any) T
- func (j *JoinClause[T]) NaturalFullJoin(table any, args ...any) T
- func (j *JoinClause[T]) NaturalFullOuterJoin(table any, args ...any) T
- type LockingClause
- type UnionClause
- type UpdateClause
- type ValueListClause
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ConflictClause ¶
func NewConflictClause ¶
func NewConflictClause[T sqb.Statement[T]](self T) *ConflictClause[T]
func (*ConflictClause[T]) AndWhere ¶
func (c *ConflictClause[T]) AndWhere(args ...any) T
AndWhere adds "AND" condition to the conflict clause:
- AndWhere(condition string)
- AndWhere(condition ConditionalExpression)
- AndWhere(column string, operator string, value any)
- AndWhere(operand any, operator string, value any)
- AndWhere(operator string, operand any)
func (*ConflictClause[T]) BuildConflict ¶
func (c *ConflictClause[T]) BuildConflict() T
func (*ConflictClause[T]) CleanConflict ¶
func (c *ConflictClause[T]) CleanConflict() T
func (*ConflictClause[T]) CopyConflict ¶
func (c *ConflictClause[T]) CopyConflict(self T) *ConflictClause[T]
func (*ConflictClause[T]) DoNothing ¶
func (c *ConflictClause[T]) DoNothing() T
func (*ConflictClause[T]) DoUpdate ¶
func (c *ConflictClause[T]) DoUpdate(column any, args ...any) T
DoUpdate adds value assignment to a column of the "on conflict do update" clause:
- DoUpdate(column any)
- DoUpdate(column any, value any)
func (*ConflictClause[T]) DoUpdateWithCondition ¶
func (c *ConflictClause[T]) DoUpdateWithCondition(column any, valueOrAssignmentPredicate any, args ...any) T
DoUpdateWithCondition adds value assignment to a column with condition of the "on conflict do update" clause:
- DoUpdateWithCondition(column any, assignmentPredicate any)
- DoUpdateWithCondition(column any, value any, assignmentPredicate any)
func (*ConflictClause[T]) OnConflict ¶
func (c *ConflictClause[T]) OnConflict(args ...any) T
OnConflict adds index column and predicate to the "on conflict" clause:
- OnConflict()
- OnConflict(indexColumn any)
- OnConflict(indexColumn any, indexPredicate any)
func (*ConflictClause[T]) OnConflictDoNothing ¶
func (c *ConflictClause[T]) OnConflictDoNothing(args ...any) T
func (*ConflictClause[T]) OnConflictDoUpdate ¶
func (c *ConflictClause[T]) OnConflictDoUpdate(indexColumn any, column any, args ...any) T
OnConflictDoUpdate adds index column and column assignment to the "on conflict" clause:
- OnConflictDoUpdate(indexColumn any, column any)
- OnConflictDoUpdate(indexColumn any, column any, value any)
func (*ConflictClause[T]) OnConstraint ¶
func (c *ConflictClause[T]) OnConstraint(indexConstraint string) T
func (*ConflictClause[T]) OrWhere ¶
func (c *ConflictClause[T]) OrWhere(args ...any) T
OrWhere adds "OR" condition to the conflict clause:
- OrWhere(condition string)
- OrWhere(condition ConditionalExpression)
- OrWhere(column string, operator string, value any)
- OrWhere(operand any, operator string, value any)
- OrWhere(operator string, operand any)
func (*ConflictClause[T]) Where ¶
func (c *ConflictClause[T]) Where(args ...any) T
Where adds "AND" or "OR" condition to the conflict clause:
- Where(condition string)
- Where(condition ConditionalExpression)
- Where(column string, operator string, value any)
- Where(operand any, operator string, value any)
- Where(operator string, operand any)
type DeleteClause ¶
type DeleteClause[T sqb.Statement[T]] struct { *sql.DeleteClause[T] // contains filtered or unexported fields }
func NewDeleteClause ¶
func NewDeleteClause[T sqb.Statement[T]](self T) *DeleteClause[T]
func (*DeleteClause[T]) BuildDelete ¶
func (d *DeleteClause[T]) BuildDelete() T
func (*DeleteClause[T]) CleanDelete ¶
func (d *DeleteClause[T]) CleanDelete() T
func (*DeleteClause[T]) CopyDelete ¶
func (d *DeleteClause[T]) CopyDelete(self T) *DeleteClause[T]
func (*DeleteClause[T]) FromOnly ¶
func (d *DeleteClause[T]) FromOnly(table any, args ...any) T
FromOnly adds table name and its alias to the "delete from only" clause:
- FromOnly(table any)
- FromOnly(table any, alias any)
type InsertClause ¶
type InsertClause[T sqb.Statement[T]] struct { *sql.InsertClause[T] }
func NewInsertClause ¶
func NewInsertClause[T sqb.Statement[T]](self T) *InsertClause[T]
func (*InsertClause[T]) BuildInsert ¶
func (i *InsertClause[T]) BuildInsert() T
func (*InsertClause[T]) CopyInsert ¶
func (i *InsertClause[T]) CopyInsert(self T) *InsertClause[T]
type JoinClause ¶
type JoinClause[T sqb.Statement[T]] struct { *sql.JoinClause[T] }
func NewJoinClause ¶
func NewJoinClause[T sqb.Statement[T]](self T) *JoinClause[T]
func (*JoinClause[T]) CopyJoin ¶
func (j *JoinClause[T]) CopyJoin(self T) *JoinClause[T]
func (*JoinClause[T]) FullJoin ¶
func (j *JoinClause[T]) FullJoin(table any, args ...any) T
FullJoin adds full join on new table with alias and condition:
- FullJoin(table any, condition any)
- FullJoin(table any, alias any, condition any)
func (*JoinClause[T]) FullOuterJoin ¶
func (j *JoinClause[T]) FullOuterJoin(table any, args ...any) T
FullOuterJoin adds full outer join on new table with alias and condition:
- FullOuterJoin(table any, condition any)
- FullOuterJoin(table any, alias any, condition any)
func (*JoinClause[T]) NaturalFullJoin ¶
func (j *JoinClause[T]) NaturalFullJoin(table any, args ...any) T
NaturalFullJoin adds natural full join on new table with alias and condition:
- NaturalFullJoin(table any, condition any)
- NaturalFullJoin(table any, alias any, condition any)
func (*JoinClause[T]) NaturalFullOuterJoin ¶
func (j *JoinClause[T]) NaturalFullOuterJoin(table any, args ...any) T
NaturalFullOuterJoin adds natural full outer join on new table with alias and condition:
- NaturalFullOuterJoin(table any, condition any)
- NaturalFullOuterJoin(table any, alias any, condition any)
type LockingClause ¶
type LockingClause[T sqb.Statement[T]] struct { *sql.LockingClause[T] }
func NewLockingClause ¶
func NewLockingClause[T sqb.Statement[T]](self T) *LockingClause[T]
func (*LockingClause[T]) CopyLock ¶
func (l *LockingClause[T]) CopyLock(self T) *LockingClause[T]
func (*LockingClause[T]) ForKeyShare ¶
func (l *LockingClause[T]) ForKeyShare(args ...any) T
ForKeyShare sets the lock for key share clause of the statement:
- ForKeyShare(table any)
- ForKeyShare(table any, option string)
func (*LockingClause[T]) ForNoKeyUpdate ¶
func (l *LockingClause[T]) ForNoKeyUpdate(args ...any) T
ForNoKeyUpdate sets the lock for no key update clause of the statement:
- ForNoKeyUpdate(table any)
- ForNoKeyUpdate(table any, option string)
type UnionClause ¶
type UnionClause[T sqb.QueryStmt[T]] struct { *sql.UnionClause[T] }
func NewUnionClause ¶
func NewUnionClause[T sqb.QueryStmt[T]](self T) *UnionClause[T]
func (*UnionClause[T]) UnionExcept ¶
func (u *UnionClause[T]) UnionExcept(query sqb.Query) T
func (*UnionClause[T]) UnionExceptAll ¶
func (u *UnionClause[T]) UnionExceptAll(query sqb.Query) T
func (*UnionClause[T]) UnionIntersect ¶
func (u *UnionClause[T]) UnionIntersect(query sqb.Query) T
func (*UnionClause[T]) UnionIntersectAll ¶
func (u *UnionClause[T]) UnionIntersectAll(query sqb.Query) T
type UpdateClause ¶
type UpdateClause[T sqb.Statement[T]] struct { *sql.UpdateClause[T] // contains filtered or unexported fields }
func NewUpdateClause ¶
func NewUpdateClause[T sqb.Statement[T]](self T) *UpdateClause[T]
func (*UpdateClause[T]) BuildUpdate ¶
func (u *UpdateClause[T]) BuildUpdate() T
func (*UpdateClause[T]) CleanUpdate ¶
func (u *UpdateClause[T]) CleanUpdate() T
func (*UpdateClause[T]) CopyUpdate ¶
func (u *UpdateClause[T]) CopyUpdate(self T) *UpdateClause[T]
func (*UpdateClause[T]) OnlyTable ¶
func (u *UpdateClause[T]) OnlyTable(table any, args ...any) T
OnlyTable adds table name and its alias to the "update only" clause:
- OnlyTable(table any)
- OnlyTable(table any, alias any)
type ValueListClause ¶
type ValueListClause[T sqb.ColumnsAwareStmt[T], Q sqb.QueryStmt[Q]] struct { *sql.ValueListClause[T, Q] }
func NewValueListClause ¶
func NewValueListClause[T sqb.ColumnsAwareStmt[T], Q sqb.QueryStmt[Q]](self T) *ValueListClause[T, Q]
func (*ValueListClause[T, Q]) BuildValueList ¶
func (v *ValueListClause[T, Q]) BuildValueList() T
func (*ValueListClause[T, Q]) CopyValueList ¶
func (v *ValueListClause[T, Q]) CopyValueList(self T) *ValueListClause[T, Q]