postgresql

package
v0.0.14 Latest Latest
Warning

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

Go to latest
Published: Jul 14, 2025 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConflictClause

type ConflictClause[T sqb.Statement[T]] struct {
	// contains filtered or unexported fields
}

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 MatchClause added in v0.0.13

type MatchClause[T sqb.Statement[T], I sqb.InsertStatement[I], U sqb.UpdateStatement[U]] struct {
	// contains filtered or unexported fields
}

func NewMatchClause added in v0.0.13

func NewMatchClause[T sqb.Statement[T], I sqb.InsertStatement[I], U sqb.UpdateStatement[U]](self T) *MatchClause[T, I, U]

func (*MatchClause[T, I, U]) BuildMatch added in v0.0.13

func (m *MatchClause[T, I, U]) BuildMatch() T

func (*MatchClause[T, I, U]) CleanMatch added in v0.0.13

func (m *MatchClause[T, I, U]) CleanMatch() T

func (*MatchClause[T, I, U]) CopyMatch added in v0.0.13

func (m *MatchClause[T, I, U]) CopyMatch(self T) *MatchClause[T, I, U]

func (*MatchClause[T, I, U]) ThenDelete added in v0.0.13

func (m *MatchClause[T, I, U]) ThenDelete() T

func (*MatchClause[T, I, U]) ThenDoNothing added in v0.0.13

func (m *MatchClause[T, I, U]) ThenDoNothing() T

func (*MatchClause[T, I, U]) ThenInsert added in v0.0.13

func (m *MatchClause[T, I, U]) ThenInsert(insertStmt I) T

func (*MatchClause[T, I, U]) ThenUpdate added in v0.0.13

func (m *MatchClause[T, I, U]) ThenUpdate(updateStmt U) T

func (*MatchClause[T, I, U]) WhenMatched added in v0.0.13

func (m *MatchClause[T, I, U]) WhenMatched() T

func (*MatchClause[T, I, U]) WhenMatchedAnd added in v0.0.13

func (m *MatchClause[T, I, U]) WhenMatchedAnd(args ...any) T

func (*MatchClause[T, I, U]) WhenMatchedThenDelete added in v0.0.13

func (m *MatchClause[T, I, U]) WhenMatchedThenDelete() T

func (*MatchClause[T, I, U]) WhenMatchedThenDoNothing added in v0.0.13

func (m *MatchClause[T, I, U]) WhenMatchedThenDoNothing() T

func (*MatchClause[T, I, U]) WhenNotMatched added in v0.0.13

func (m *MatchClause[T, I, U]) WhenNotMatched() T

func (*MatchClause[T, I, U]) WhenNotMatchedAnd added in v0.0.13

func (m *MatchClause[T, I, U]) WhenNotMatchedAnd(args ...any) T

func (*MatchClause[T, I, U]) WhenNotMatchedThenDoNothing added in v0.0.13

func (m *MatchClause[T, I, U]) WhenNotMatchedThenDoNothing() T

type MergeClause added in v0.0.13

type MergeClause[T sqb.Statement[T]] struct {
	// contains filtered or unexported fields
}

func NewMergeClause added in v0.0.13

func NewMergeClause[T sqb.Statement[T]](self T) *MergeClause[T]

func (*MergeClause[T]) BuildMerge added in v0.0.13

func (m *MergeClause[T]) BuildMerge() T

func (*MergeClause[T]) CleanMerge added in v0.0.13

func (m *MergeClause[T]) CleanMerge() T

func (*MergeClause[T]) CopyMerge added in v0.0.13

func (m *MergeClause[T]) CopyMerge(self T) *MergeClause[T]

func (*MergeClause[T]) Into added in v0.0.13

func (m *MergeClause[T]) Into(table any, args ...any) T

type OnClause added in v0.0.13

type OnClause[T sqb.Statement[T]] struct {
	// contains filtered or unexported fields
}

func NewOnClause added in v0.0.13

func NewOnClause[T sqb.Statement[T]](self T) *OnClause[T]

func (*OnClause[T]) AndOn added in v0.0.13

func (on *OnClause[T]) AndOn(args ...any) T

func (*OnClause[T]) BuildOn added in v0.0.13

func (on *OnClause[T]) BuildOn() T

func (*OnClause[T]) CleanOn added in v0.0.13

func (on *OnClause[T]) CleanOn() T

func (*OnClause[T]) CopyOn added in v0.0.13

func (on *OnClause[T]) CopyOn(self T) *OnClause[T]

func (*OnClause[T]) On added in v0.0.13

func (on *OnClause[T]) On(args ...any) T

func (*OnClause[T]) OrOn added in v0.0.13

func (on *OnClause[T]) OrOn(args ...any) T

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]

Jump to

Keyboard shortcuts

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