Documentation
¶
Overview ¶
TODO:
Check if alias pointer is nil or not in As method
Index ¶
- Constants
- Variables
- func Avg(col Expression) *aggColumn
- func CTE(name string, query Expression) cteClause
- func Count(columns ...Column) *aggColumn
- func DefineSchema[T any, S any](tableName string, dialect Dialect, builder func(Table[T]) S) S
- func Max(col Expression) *aggColumn
- func Min(col Expression) *aggColumn
- func RecursiveCTE(name string, query Expression) cteClause
- func Sum(col Expression) *aggColumn
- type AGREGATE_FUNCTION_TYPE
- type AnyColumn
- func (c AnyColumn) Alias() *string
- func (c AnyColumn) Args() []any
- func (c AnyColumn) As(alias string) AnyColumn
- func (c AnyColumn) Between(min, max any) Expression
- func (c AnyColumn) ColumnName() string
- func (c AnyColumn) Eq(val any) Expression
- func (c AnyColumn) EqSub(subQuery Expression) Expression
- func (c AnyColumn) Gt(val any) Expression
- func (c AnyColumn) Gte(val any) Expression
- func (c AnyColumn) In(vals ...any) Expression
- func (c AnyColumn) InSub(subQuery Expression) Expression
- func (c AnyColumn) IsNotNull() Expression
- func (c AnyColumn) IsNull() Expression
- func (c AnyColumn) Lt(val any) Expression
- func (c AnyColumn) Lte(val any) Expression
- func (c AnyColumn) NotEq(val any) Expression
- func (c AnyColumn) NotEqSub(subQuery Expression) Expression
- func (c AnyColumn) NotIn(vals ...any) Expression
- func (c AnyColumn) NotInSub(subQuery Expression) Expression
- func (c AnyColumn) Sql() string
- func (c AnyColumn) TableName() string
- type BoolColumn
- func (c BoolColumn) Alias() *string
- func (c BoolColumn) Args() []any
- func (c BoolColumn) As(alias string) BoolColumn
- func (c BoolColumn) ColumnName() string
- func (c BoolColumn) Eq(val bool) Expression
- func (c BoolColumn) IsFalse() Expression
- func (c BoolColumn) IsNotNull() Expression
- func (c BoolColumn) IsNull() Expression
- func (c BoolColumn) IsTrue() Expression
- func (c BoolColumn) NotEq(val bool) Expression
- func (c BoolColumn) Sql() string
- func (c BoolColumn) TableName() string
- type BytesColumn
- func (c BytesColumn) Alias() *string
- func (c BytesColumn) Args() []any
- func (c BytesColumn) As(alias string) BytesColumn
- func (c BytesColumn) ColumnName() string
- func (c BytesColumn) Eq(val []byte) Expression
- func (c BytesColumn) IsNotNull() Expression
- func (c BytesColumn) IsNull() Expression
- func (c BytesColumn) NotEq(val []byte) Expression
- func (c BytesColumn) Sql() string
- func (c BytesColumn) TableName() string
- type Column
- type ConflictActionType
- type ConflictInserter
- func (i *ConflictInserter[T]) Batch(size int) *ConflictInserter[T]
- func (i *ConflictInserter[T]) DoNothing() *ConflictInserter[T]
- func (i *ConflictInserter[T]) Exec(ctxs ...context.Context) error
- func (i *ConflictInserter[T]) ScanWith(scanner func(*sql.Rows) (*T, error), ctxs ...context.Context) ([]*T, error)
- func (i *ConflictInserter[T]) SetUpdate(col Column, val any) *ConflictInserter[T]
- func (i *ConflictInserter[T]) ToSql() (string, []any, error)
- type DB
- type DBOption
- type DecimalColumn
- func (c DecimalColumn) Alias() *string
- func (c DecimalColumn) Args() []any
- func (c DecimalColumn) As(alias string) DecimalColumn
- func (c DecimalColumn) Between(min, max string) Expression
- func (c DecimalColumn) ColumnName() string
- func (c DecimalColumn) Eq(val string) Expression
- func (c DecimalColumn) EqSub(subQuery Expression) Expression
- func (c DecimalColumn) Gt(val string) Expression
- func (c DecimalColumn) Gte(val string) Expression
- func (c DecimalColumn) In(vals ...string) Expression
- func (c DecimalColumn) InSub(subQuery Expression) Expression
- func (c DecimalColumn) IsNotNull() Expression
- func (c DecimalColumn) IsNull() Expression
- func (c DecimalColumn) Lt(val string) Expression
- func (c DecimalColumn) Lte(val string) Expression
- func (c DecimalColumn) NotEq(val string) Expression
- func (c DecimalColumn) NotEqSub(subQuery Expression) Expression
- func (c DecimalColumn) NotIn(vals ...string) Expression
- func (c DecimalColumn) NotInSub(subQuery Expression) Expression
- func (c DecimalColumn) Sql() string
- func (c DecimalColumn) TableName() string
- type Deleter
- func (d *Deleter[T]) Clone() *Deleter[T]
- func (d *Deleter[T]) Exec(ctxs ...context.Context) error
- func (d *Deleter[T]) Returning(cols ...Column) *Deleter[T]
- func (d *Deleter[T]) RowsAffected(ctxs ...context.Context) (int64, error)
- func (d *Deleter[T]) Scan(ctx context.Context, dest ...any) error
- func (d *Deleter[T]) ScanWith(scanner func(*sql.Rows) (*T, error), ctxs ...context.Context) ([]*T, error)
- func (d *Deleter[T]) ToSql() (string, []any, error)
- func (d *Deleter[T]) Where(expr ...Expression) *Deleter[T]
- type Dialect
- type EnumColumn
- func (c EnumColumn[T]) Alias() *string
- func (c EnumColumn[T]) Args() []any
- func (c EnumColumn[T]) As(alias string) EnumColumn[T]
- func (c EnumColumn[T]) ColumnName() string
- func (c EnumColumn[T]) Eq(val T) Expression
- func (c EnumColumn[T]) In(vals ...T) Expression
- func (c EnumColumn[T]) IsNotNull() Expression
- func (c EnumColumn[T]) IsNull() Expression
- func (c EnumColumn[T]) NotEq(val T) Expression
- func (c EnumColumn[T]) NotIn(vals ...T) Expression
- func (c EnumColumn[T]) Sql() string
- func (c EnumColumn[T]) TableName() string
- type ErrorMapper
- type Expression
- type Float32Column
- func (c Float32Column) Alias() *string
- func (c Float32Column) Args() []any
- func (c Float32Column) As(alias string) Float32Column
- func (c Float32Column) Between(min, max float32) Expression
- func (c Float32Column) ColumnName() string
- func (c Float32Column) Eq(val float32) Expression
- func (c Float32Column) EqSub(subQuery Expression) Expression
- func (c Float32Column) Gt(val float32) Expression
- func (c Float32Column) Gte(val float32) Expression
- func (c Float32Column) In(vals ...float32) Expression
- func (c Float32Column) InSub(subQuery Expression) Expression
- func (c Float32Column) IsNotNull() Expression
- func (c Float32Column) IsNull() Expression
- func (c Float32Column) Lt(val float32) Expression
- func (c Float32Column) Lte(val float32) Expression
- func (c Float32Column) NotEq(val float32) Expression
- func (c Float32Column) NotEqSub(subQuery Expression) Expression
- func (c Float32Column) NotIn(vals ...float32) Expression
- func (c Float32Column) NotInSub(subQuery Expression) Expression
- func (c Float32Column) Sql() string
- func (c Float32Column) TableName() string
- type FloatColumn
- func (c FloatColumn) Alias() *string
- func (c FloatColumn) Args() []any
- func (c FloatColumn) As(alias string) FloatColumn
- func (c FloatColumn) Between(min, max float64) Expression
- func (c FloatColumn) ColumnName() string
- func (c FloatColumn) Eq(val float64) Expression
- func (c FloatColumn) EqSub(subQuery Expression) Expression
- func (c FloatColumn) Gt(val float64) Expression
- func (c FloatColumn) Gte(val float64) Expression
- func (c FloatColumn) In(vals ...float64) Expression
- func (c FloatColumn) InSub(subQuery Expression) Expression
- func (c FloatColumn) IsNotNull() Expression
- func (c FloatColumn) IsNull() Expression
- func (c FloatColumn) Lt(val float64) Expression
- func (c FloatColumn) Lte(val float64) Expression
- func (c FloatColumn) NotEq(val float64) Expression
- func (c FloatColumn) NotEqSub(subQuery Expression) Expression
- func (c FloatColumn) NotIn(vals ...float64) Expression
- func (c FloatColumn) NotInSub(subQuery Expression) Expression
- func (c FloatColumn) Sql() string
- func (c FloatColumn) TableName() string
- type Inserter
- func (i *Inserter[T]) Batch(size int) *Inserter[T]
- func (i *Inserter[T]) BatchQueries() ([]string, [][]any, error)
- func (i *Inserter[T]) Columns(cols ...Column) *Inserter[T]
- func (i *Inserter[T]) Exec(ctxs ...context.Context) error
- func (i *Inserter[T]) Models(models ...*T) *Inserter[T]
- func (i *Inserter[T]) OnConflict(cols ...Column) *ConflictInserter[T]
- func (i *Inserter[T]) Returning(cols ...Column) *Inserter[T]
- func (i *Inserter[T]) ScanWith(scanner func(*sql.Rows) (*T, error), ctxs ...context.Context) ([]*T, error)
- func (i *Inserter[T]) ToSql() (string, []any, error)
- func (i *Inserter[T]) Values(vals ...any) *Inserter[T]
- type Int64Column
- func (c Int64Column) Alias() *string
- func (c Int64Column) Args() []any
- func (c Int64Column) As(alias string) Int64Column
- func (c Int64Column) Between(min, max int64) Expression
- func (c Int64Column) ColumnName() string
- func (c Int64Column) Eq(val int64) Expression
- func (c Int64Column) EqSub(subQuery Expression) Expression
- func (c Int64Column) Gt(val int64) Expression
- func (c Int64Column) Gte(val int64) Expression
- func (c Int64Column) In(vals ...int64) Expression
- func (c Int64Column) InSub(subQuery Expression) Expression
- func (c Int64Column) IsNotNull() Expression
- func (c Int64Column) IsNull() Expression
- func (c Int64Column) Lt(val int64) Expression
- func (c Int64Column) Lte(val int64) Expression
- func (c Int64Column) NotEq(val int64) Expression
- func (c Int64Column) NotEqSub(subQuery Expression) Expression
- func (c Int64Column) NotIn(vals ...int64) Expression
- func (c Int64Column) NotInSub(subQuery Expression) Expression
- func (c Int64Column) Sql() string
- func (c Int64Column) TableName() string
- type IntColumn
- func (c IntColumn) Alias() *string
- func (c IntColumn) Args() []any
- func (c IntColumn) As(alias string) IntColumn
- func (c IntColumn) Between(min, max int) Expression
- func (c IntColumn) ColumnName() string
- func (c IntColumn) Eq(val int) Expression
- func (c IntColumn) EqSub(subQuery Expression) Expression
- func (c IntColumn) Gt(val int) Expression
- func (c IntColumn) Gte(val int) Expression
- func (c IntColumn) In(vals ...int) Expression
- func (c IntColumn) InSub(subQuery Expression) Expression
- func (c IntColumn) IsNotNull() Expression
- func (c IntColumn) IsNull() Expression
- func (c IntColumn) Lt(val int) Expression
- func (c IntColumn) Lte(val int) Expression
- func (c IntColumn) NotEq(val int) Expression
- func (c IntColumn) NotEqSub(subQuery Expression) Expression
- func (c IntColumn) NotIn(vals ...int) Expression
- func (c IntColumn) NotInSub(subQuery Expression) Expression
- func (c IntColumn) Sql() string
- func (c IntColumn) TableName() string
- type JSONB
- type JSONBColumn
- func (c JSONBColumn[T]) Alias() *string
- func (c JSONBColumn[T]) Args() []any
- func (c JSONBColumn[T]) As(alias string) JSONBColumn[T]
- func (c JSONBColumn[T]) ColumnName() string
- func (c JSONBColumn[T]) ContainedBy(val T) Expression
- func (c JSONBColumn[T]) Contains(val T) Expression
- func (c JSONBColumn[T]) Eq(val T) Expression
- func (c JSONBColumn[T]) HasAllKeys(keys ...string) Expression
- func (c JSONBColumn[T]) HasAnyKey(keys ...string) Expression
- func (c JSONBColumn[T]) HasKey(key string) Expression
- func (c JSONBColumn[T]) IsNotNull() Expression
- func (c JSONBColumn[T]) IsNull() Expression
- func (c JSONBColumn[T]) NotEq(val T) Expression
- func (c JSONBColumn[T]) Path(keys ...string) JSONBColumn[T]
- func (c JSONBColumn[T]) PathText(keys ...string) Column
- func (c JSONBColumn[T]) Sql() string
- func (c JSONBColumn[T]) TableName() string
- type MSSQLDialect
- type MySQLDialect
- type OPERATOR
- type PostgreSQLDialect
- type Querier
- type RowScanner
- type SQLiteDialect
- type Selector
- func (s *Selector[T]) All(ctxs ...context.Context) ([]*T, error)
- func (s *Selector[T]) Args() []any
- func (s *Selector[T]) Clone() *Selector[T]
- func (s *Selector[T]) Count(ctxs ...context.Context) (int64, error)
- func (s *Selector[T]) Distinct(columns ...Column) *Selector[T]
- func (s *Selector[T]) Exists(ctxs ...context.Context) (bool, error)
- func (s *Selector[T]) First() (*T, error)
- func (s *Selector[T]) ForShare() *Selector[T]
- func (s *Selector[T]) ForUpdate() *Selector[T]
- func (s *Selector[T]) GroupBy(columns ...Expression) *Selector[T]
- func (s *Selector[T]) Having(columns ...Expression) *Selector[T]
- func (s *Selector[T]) InnerJoin(schema Tabler, onLeft Column, onRight Column) *Selector[T]
- func (s *Selector[T]) LeftJoin(schema Tabler, onLeft Column, onRight Column) *Selector[T]
- func (s *Selector[T]) Limit(count int) *Selector[T]
- func (s *Selector[T]) NoWait() *Selector[T]
- func (s *Selector[T]) Offset(count int) *Selector[T]
- func (s *Selector[T]) One(ctxs ...context.Context) (*T, error)
- func (s *Selector[T]) OrderBy(expr ...Expression) *Selector[T]
- func (s *Selector[T]) RightJoin(schema Tabler, onLeft Column, onRight Column) *Selector[T]
- func (s *Selector[T]) Scan(dest ...any) error
- func (s *Selector[T]) ScanCtx(ctx context.Context, dest ...any) error
- func (s *Selector[T]) ScanWith(scanner func(*sql.Rows) (*T, error), ctxs ...context.Context) ([]*T, error)
- func (s *Selector[T]) Select(columns ...Column) *Selector[T]
- func (s *Selector[T]) SkipLocked() *Selector[T]
- func (s *Selector[T]) Sql() string
- func (s *Selector[T]) ToSql() (string, []any, error)
- func (s *Selector[T]) Where(expr ...Expression) *Selector[T]
- func (s *Selector[T]) With(ctes ...cteClause) *Selector[T]
- type SetQuery
- func (sq *SetQuery[T]) All(ctxs ...context.Context) ([]*T, error)
- func (sq *SetQuery[T]) Args() []any
- func (sq *SetQuery[T]) Except(query Expression) *SetQuery[T]
- func (sq *SetQuery[T]) Intersect(query Expression) *SetQuery[T]
- func (sq *SetQuery[T]) Limit(count int) *SetQuery[T]
- func (sq *SetQuery[T]) Offset(count int) *SetQuery[T]
- func (sq *SetQuery[T]) OrderBy(exprs ...Expression) *SetQuery[T]
- func (sq *SetQuery[T]) Sql() string
- func (sq *SetQuery[T]) ToSql() (string, []any, error)
- func (sq *SetQuery[T]) Union(query Expression) *SetQuery[T]
- func (sq *SetQuery[T]) UnionAll(query Expression) *SetQuery[T]
- type StringColumn
- func (c StringColumn) Alias() *string
- func (c StringColumn) Args() []any
- func (c StringColumn) As(alias string) StringColumn
- func (c StringColumn) ColumnName() string
- func (c StringColumn) Eq(val string) Expression
- func (c StringColumn) EqSub(subQuery Expression) Expression
- func (c StringColumn) In(vals ...string) Expression
- func (c StringColumn) InSub(subQuery Expression) Expression
- func (c StringColumn) IsNotNull() Expression
- func (c StringColumn) IsNull() Expression
- func (c StringColumn) Like(val string) Expression
- func (c StringColumn) NotEq(val string) Expression
- func (c StringColumn) NotEqSub(subQuery Expression) Expression
- func (c StringColumn) NotIn(vals ...string) Expression
- func (c StringColumn) NotInSub(subQuery Expression) Expression
- func (c StringColumn) NotLike(val string) Expression
- func (c StringColumn) Sql() string
- func (c StringColumn) TableName() string
- type Table
- func (t Table[T]) AnyColumn(name string) AnyColumn
- func (t Table[T]) BoolColumn(name string) BoolColumn
- func (t Table[T]) BytesColumn(name string) BytesColumn
- func (t Table[T]) DecimalColumn(name string) DecimalColumn
- func (t Table[T]) Delete(db Querier) *Deleter[T]
- func (t Table[T]) Float32Column(name string) Float32Column
- func (t Table[T]) FloatColumn(name string) FloatColumn
- func (t Table[T]) From(db Querier) *Selector[T]
- func (t Table[T]) Insert(db Querier) *Inserter[T]
- func (t Table[T]) Int64Column(name string) Int64Column
- func (t Table[T]) IntColumn(name string) IntColumn
- func (t Table[T]) StringColumn(name string) StringColumn
- func (t Table[T]) TableName() string
- func (t Table[T]) TimeColumn(name string) TimeColumn
- func (t Table[T]) UUIDColumn(name string) UUIDColumn
- func (t Table[T]) Update(db Querier) *Updater[T]
- type Tabler
- type TimeColumn
- func (c TimeColumn) Alias() *string
- func (c TimeColumn) Args() []any
- func (c TimeColumn) As(alias string) TimeColumn
- func (c TimeColumn) Between(min, max time.Time) Expression
- func (c TimeColumn) ColumnName() string
- func (c TimeColumn) Eq(val time.Time) Expression
- func (c TimeColumn) EqSub(subQuery Expression) Expression
- func (c TimeColumn) Gt(val time.Time) Expression
- func (c TimeColumn) Gte(val time.Time) Expression
- func (c TimeColumn) In(vals ...time.Time) Expression
- func (c TimeColumn) InSub(subQuery Expression) Expression
- func (c TimeColumn) IsNotNull() Expression
- func (c TimeColumn) IsNull() Expression
- func (c TimeColumn) Lt(val time.Time) Expression
- func (c TimeColumn) Lte(val time.Time) Expression
- func (c TimeColumn) NotEq(val time.Time) Expression
- func (c TimeColumn) NotEqSub(subQuery Expression) Expression
- func (c TimeColumn) NotIn(vals ...time.Time) Expression
- func (c TimeColumn) NotInSub(subQuery Expression) Expression
- func (c TimeColumn) Sql() string
- func (c TimeColumn) TableName() string
- type Tx
- type UUIDColumn
- func (c UUIDColumn) Alias() *string
- func (c UUIDColumn) Args() []any
- func (c UUIDColumn) As(alias string) UUIDColumn
- func (c UUIDColumn) ColumnName() string
- func (c UUIDColumn) Eq(val string) Expression
- func (c UUIDColumn) EqSub(subQuery Expression) Expression
- func (c UUIDColumn) In(vals ...string) Expression
- func (c UUIDColumn) InSub(subQuery Expression) Expression
- func (c UUIDColumn) IsNotNull() Expression
- func (c UUIDColumn) IsNull() Expression
- func (c UUIDColumn) NotEq(val string) Expression
- func (c UUIDColumn) NotEqSub(subQuery Expression) Expression
- func (c UUIDColumn) NotIn(vals ...string) Expression
- func (c UUIDColumn) NotInSub(subQuery Expression) Expression
- func (c UUIDColumn) Sql() string
- func (c UUIDColumn) TableName() string
- type Updater
- func (u *Updater[T]) Clone() *Updater[T]
- func (u *Updater[T]) Exec(ctxs ...context.Context) error
- func (u *Updater[T]) Returning(cols ...Column) *Updater[T]
- func (u *Updater[T]) RowsAffected(ctxs ...context.Context) (int64, error)
- func (u *Updater[T]) Scan(ctx context.Context, dest ...any) error
- func (u *Updater[T]) ScanWith(scanner func(*sql.Rows) (*T, error), ctxs ...context.Context) ([]*T, error)
- func (u *Updater[T]) Set(col Column, val any) *Updater[T]
- func (u *Updater[T]) ToSql() (string, []any, error)
- func (u *Updater[T]) Where(expr ...Expression) *Updater[T]
Constants ¶
const ( InnerJoinType joinType = "INNER JOIN" LeftJoinType joinType = "LEFT JOIN" RightJoinType joinType = "RIGHT JOIN" )
Variables ¶
var ( ErrNotFound = errors.New("dew: record not found") ErrUniqueViolation = errors.New("dew: unique constraint violation") ErrForeignKey = errors.New("dew: foreign key violation") ErrCheckViolation = errors.New("dew: check constraint violation") ErrNotNull = errors.New("dew: not null violation") )
Functions ¶
func Avg ¶
func Avg(col Expression) *aggColumn
func CTE ¶
func CTE(name string, query Expression) cteClause
func DefineSchema ¶
func Max ¶
func Max(col Expression) *aggColumn
func Min ¶
func Min(col Expression) *aggColumn
func RecursiveCTE ¶
func RecursiveCTE(name string, query Expression) cteClause
func Sum ¶
func Sum(col Expression) *aggColumn
Types ¶
type AGREGATE_FUNCTION_TYPE ¶
type AGREGATE_FUNCTION_TYPE string
const ( SUM AGREGATE_FUNCTION_TYPE = "SUM" AVG AGREGATE_FUNCTION_TYPE = "AVG" MAX AGREGATE_FUNCTION_TYPE = "MAX" MIN AGREGATE_FUNCTION_TYPE = "MIN" COUNT AGREGATE_FUNCTION_TYPE = "COUNT" )
type AnyColumn ¶
type AnyColumn struct {
// contains filtered or unexported fields
}
func (AnyColumn) Between ¶
func (c AnyColumn) Between(min, max any) Expression
func (AnyColumn) ColumnName ¶
func (AnyColumn) Eq ¶
func (c AnyColumn) Eq(val any) Expression
func (AnyColumn) EqSub ¶
func (c AnyColumn) EqSub(subQuery Expression) Expression
func (AnyColumn) Gt ¶
func (c AnyColumn) Gt(val any) Expression
func (AnyColumn) Gte ¶
func (c AnyColumn) Gte(val any) Expression
func (AnyColumn) In ¶
func (c AnyColumn) In(vals ...any) Expression
func (AnyColumn) InSub ¶
func (c AnyColumn) InSub(subQuery Expression) Expression
func (AnyColumn) IsNotNull ¶
func (c AnyColumn) IsNotNull() Expression
func (AnyColumn) IsNull ¶
func (c AnyColumn) IsNull() Expression
func (AnyColumn) Lt ¶
func (c AnyColumn) Lt(val any) Expression
func (AnyColumn) Lte ¶
func (c AnyColumn) Lte(val any) Expression
func (AnyColumn) NotEq ¶
func (c AnyColumn) NotEq(val any) Expression
func (AnyColumn) NotEqSub ¶
func (c AnyColumn) NotEqSub(subQuery Expression) Expression
func (AnyColumn) NotIn ¶
func (c AnyColumn) NotIn(vals ...any) Expression
func (AnyColumn) NotInSub ¶
func (c AnyColumn) NotInSub(subQuery Expression) Expression
type BoolColumn ¶
type BoolColumn struct {
// contains filtered or unexported fields
}
func (BoolColumn) Alias ¶
func (c BoolColumn) Alias() *string
func (BoolColumn) Args ¶
func (c BoolColumn) Args() []any
func (BoolColumn) As ¶
func (c BoolColumn) As(alias string) BoolColumn
func (BoolColumn) ColumnName ¶
func (c BoolColumn) ColumnName() string
func (BoolColumn) Eq ¶
func (c BoolColumn) Eq(val bool) Expression
func (BoolColumn) IsFalse ¶
func (c BoolColumn) IsFalse() Expression
func (BoolColumn) IsNotNull ¶
func (c BoolColumn) IsNotNull() Expression
func (BoolColumn) IsNull ¶
func (c BoolColumn) IsNull() Expression
func (BoolColumn) IsTrue ¶
func (c BoolColumn) IsTrue() Expression
func (BoolColumn) NotEq ¶
func (c BoolColumn) NotEq(val bool) Expression
func (BoolColumn) Sql ¶
func (c BoolColumn) Sql() string
func (BoolColumn) TableName ¶
func (c BoolColumn) TableName() string
type BytesColumn ¶
type BytesColumn struct {
// contains filtered or unexported fields
}
func (BytesColumn) Alias ¶
func (c BytesColumn) Alias() *string
func (BytesColumn) Args ¶
func (c BytesColumn) Args() []any
func (BytesColumn) As ¶
func (c BytesColumn) As(alias string) BytesColumn
func (BytesColumn) ColumnName ¶
func (c BytesColumn) ColumnName() string
func (BytesColumn) Eq ¶
func (c BytesColumn) Eq(val []byte) Expression
func (BytesColumn) IsNotNull ¶
func (c BytesColumn) IsNotNull() Expression
func (BytesColumn) IsNull ¶
func (c BytesColumn) IsNull() Expression
func (BytesColumn) NotEq ¶
func (c BytesColumn) NotEq(val []byte) Expression
func (BytesColumn) Sql ¶
func (c BytesColumn) Sql() string
func (BytesColumn) TableName ¶
func (c BytesColumn) TableName() string
type Column ¶
type Column interface {
Expression
ColumnName() string
TableName() string
Alias() *string
}
func As ¶
func As(exp Expression, alias string) Column
type ConflictActionType ¶
type ConflictActionType string
const ( ConflictActionTypeNothing ConflictActionType = "NOTHING" ConflictActionTypeUpdate ConflictActionType = "UPDATE" )
type ConflictInserter ¶
func (*ConflictInserter[T]) Batch ¶
func (i *ConflictInserter[T]) Batch(size int) *ConflictInserter[T]
func (*ConflictInserter[T]) DoNothing ¶
func (i *ConflictInserter[T]) DoNothing() *ConflictInserter[T]
func (*ConflictInserter[T]) Exec ¶
func (i *ConflictInserter[T]) Exec(ctxs ...context.Context) error
func (*ConflictInserter[T]) SetUpdate ¶
func (i *ConflictInserter[T]) SetUpdate(col Column, val any) *ConflictInserter[T]
type DB ¶
type DBOption ¶
type DBOption func(*DB)
DBOption configures a DB instance.
func WithErrorMapper ¶
func WithErrorMapper(mapper ErrorMapper) DBOption
WithErrorMapper sets a custom error mapper for the DB.
type DecimalColumn ¶
type DecimalColumn struct {
// contains filtered or unexported fields
}
func (DecimalColumn) Alias ¶
func (c DecimalColumn) Alias() *string
func (DecimalColumn) Args ¶
func (c DecimalColumn) Args() []any
func (DecimalColumn) As ¶
func (c DecimalColumn) As(alias string) DecimalColumn
func (DecimalColumn) Between ¶
func (c DecimalColumn) Between(min, max string) Expression
func (DecimalColumn) ColumnName ¶
func (c DecimalColumn) ColumnName() string
func (DecimalColumn) Eq ¶
func (c DecimalColumn) Eq(val string) Expression
func (DecimalColumn) EqSub ¶
func (c DecimalColumn) EqSub(subQuery Expression) Expression
func (DecimalColumn) Gt ¶
func (c DecimalColumn) Gt(val string) Expression
func (DecimalColumn) Gte ¶
func (c DecimalColumn) Gte(val string) Expression
func (DecimalColumn) In ¶
func (c DecimalColumn) In(vals ...string) Expression
func (DecimalColumn) InSub ¶
func (c DecimalColumn) InSub(subQuery Expression) Expression
func (DecimalColumn) IsNotNull ¶
func (c DecimalColumn) IsNotNull() Expression
func (DecimalColumn) IsNull ¶
func (c DecimalColumn) IsNull() Expression
func (DecimalColumn) Lt ¶
func (c DecimalColumn) Lt(val string) Expression
func (DecimalColumn) Lte ¶
func (c DecimalColumn) Lte(val string) Expression
func (DecimalColumn) NotEq ¶
func (c DecimalColumn) NotEq(val string) Expression
func (DecimalColumn) NotEqSub ¶
func (c DecimalColumn) NotEqSub(subQuery Expression) Expression
func (DecimalColumn) NotIn ¶
func (c DecimalColumn) NotIn(vals ...string) Expression
func (DecimalColumn) NotInSub ¶
func (c DecimalColumn) NotInSub(subQuery Expression) Expression
func (DecimalColumn) Sql ¶
func (c DecimalColumn) Sql() string
func (DecimalColumn) TableName ¶
func (c DecimalColumn) TableName() string
type Deleter ¶
type Deleter[T any] struct { // contains filtered or unexported fields }
func (*Deleter[T]) RowsAffected ¶
func (*Deleter[T]) Where ¶
func (d *Deleter[T]) Where(expr ...Expression) *Deleter[T]
type EnumColumn ¶
type EnumColumn[T ~string] struct { // contains filtered or unexported fields }
func DefineEnumColumn ¶
func DefineEnumColumn[V ~string, T any](t Table[T], name string) EnumColumn[V]
DefineEnumColumn creates a typed enum column. Due to Go generics limitation, this is a standalone function, not a method. Usage: dew.DefineEnumColumn[Status](t, "status")
func (EnumColumn[T]) Alias ¶
func (c EnumColumn[T]) Alias() *string
func (EnumColumn[T]) Args ¶
func (c EnumColumn[T]) Args() []any
func (EnumColumn[T]) As ¶
func (c EnumColumn[T]) As(alias string) EnumColumn[T]
func (EnumColumn[T]) ColumnName ¶
func (c EnumColumn[T]) ColumnName() string
func (EnumColumn[T]) Eq ¶
func (c EnumColumn[T]) Eq(val T) Expression
func (EnumColumn[T]) In ¶
func (c EnumColumn[T]) In(vals ...T) Expression
func (EnumColumn[T]) IsNotNull ¶
func (c EnumColumn[T]) IsNotNull() Expression
func (EnumColumn[T]) IsNull ¶
func (c EnumColumn[T]) IsNull() Expression
func (EnumColumn[T]) NotEq ¶
func (c EnumColumn[T]) NotEq(val T) Expression
func (EnumColumn[T]) NotIn ¶
func (c EnumColumn[T]) NotIn(vals ...T) Expression
func (EnumColumn[T]) Sql ¶
func (c EnumColumn[T]) Sql() string
func (EnumColumn[T]) TableName ¶
func (c EnumColumn[T]) TableName() string
type ErrorMapper ¶
ErrorMapper transforms a database driver error into a dew sentinel error. Return the original error unchanged if no mapping applies.
type Expression ¶
func And ¶
func And(exprs ...Expression) Expression
func Asc ¶
func Asc(col any) Expression
func Desc ¶
func Desc(col any) Expression
func Or ¶
func Or(exprs ...Expression) Expression
func Raw ¶
func Raw(sql string, args ...any) Expression
type Float32Column ¶
type Float32Column struct {
// contains filtered or unexported fields
}
func (Float32Column) Alias ¶
func (c Float32Column) Alias() *string
func (Float32Column) Args ¶
func (c Float32Column) Args() []any
func (Float32Column) As ¶
func (c Float32Column) As(alias string) Float32Column
func (Float32Column) Between ¶
func (c Float32Column) Between(min, max float32) Expression
func (Float32Column) ColumnName ¶
func (c Float32Column) ColumnName() string
func (Float32Column) Eq ¶
func (c Float32Column) Eq(val float32) Expression
func (Float32Column) EqSub ¶
func (c Float32Column) EqSub(subQuery Expression) Expression
func (Float32Column) Gt ¶
func (c Float32Column) Gt(val float32) Expression
func (Float32Column) Gte ¶
func (c Float32Column) Gte(val float32) Expression
func (Float32Column) In ¶
func (c Float32Column) In(vals ...float32) Expression
func (Float32Column) InSub ¶
func (c Float32Column) InSub(subQuery Expression) Expression
func (Float32Column) IsNotNull ¶
func (c Float32Column) IsNotNull() Expression
func (Float32Column) IsNull ¶
func (c Float32Column) IsNull() Expression
func (Float32Column) Lt ¶
func (c Float32Column) Lt(val float32) Expression
func (Float32Column) Lte ¶
func (c Float32Column) Lte(val float32) Expression
func (Float32Column) NotEq ¶
func (c Float32Column) NotEq(val float32) Expression
func (Float32Column) NotEqSub ¶
func (c Float32Column) NotEqSub(subQuery Expression) Expression
func (Float32Column) NotIn ¶
func (c Float32Column) NotIn(vals ...float32) Expression
func (Float32Column) NotInSub ¶
func (c Float32Column) NotInSub(subQuery Expression) Expression
func (Float32Column) Sql ¶
func (c Float32Column) Sql() string
func (Float32Column) TableName ¶
func (c Float32Column) TableName() string
type FloatColumn ¶
type FloatColumn struct {
// contains filtered or unexported fields
}
func (FloatColumn) Alias ¶
func (c FloatColumn) Alias() *string
func (FloatColumn) Args ¶
func (c FloatColumn) Args() []any
func (FloatColumn) As ¶
func (c FloatColumn) As(alias string) FloatColumn
func (FloatColumn) Between ¶
func (c FloatColumn) Between(min, max float64) Expression
func (FloatColumn) ColumnName ¶
func (c FloatColumn) ColumnName() string
func (FloatColumn) Eq ¶
func (c FloatColumn) Eq(val float64) Expression
func (FloatColumn) EqSub ¶
func (c FloatColumn) EqSub(subQuery Expression) Expression
func (FloatColumn) Gt ¶
func (c FloatColumn) Gt(val float64) Expression
func (FloatColumn) Gte ¶
func (c FloatColumn) Gte(val float64) Expression
func (FloatColumn) In ¶
func (c FloatColumn) In(vals ...float64) Expression
func (FloatColumn) InSub ¶
func (c FloatColumn) InSub(subQuery Expression) Expression
func (FloatColumn) IsNotNull ¶
func (c FloatColumn) IsNotNull() Expression
func (FloatColumn) IsNull ¶
func (c FloatColumn) IsNull() Expression
func (FloatColumn) Lt ¶
func (c FloatColumn) Lt(val float64) Expression
func (FloatColumn) Lte ¶
func (c FloatColumn) Lte(val float64) Expression
func (FloatColumn) NotEq ¶
func (c FloatColumn) NotEq(val float64) Expression
func (FloatColumn) NotEqSub ¶
func (c FloatColumn) NotEqSub(subQuery Expression) Expression
func (FloatColumn) NotIn ¶
func (c FloatColumn) NotIn(vals ...float64) Expression
func (FloatColumn) NotInSub ¶
func (c FloatColumn) NotInSub(subQuery Expression) Expression
func (FloatColumn) Sql ¶
func (c FloatColumn) Sql() string
func (FloatColumn) TableName ¶
func (c FloatColumn) TableName() string
type Inserter ¶
type Inserter[T any] struct { // contains filtered or unexported fields }
func (*Inserter[T]) BatchQueries ¶
BatchQueries returns the SQL and args for each batch chunk. If Batch() was not called, returns a single-element slice.
func (*Inserter[T]) OnConflict ¶
func (i *Inserter[T]) OnConflict(cols ...Column) *ConflictInserter[T]
type Int64Column ¶
type Int64Column struct {
// contains filtered or unexported fields
}
func (Int64Column) Alias ¶
func (c Int64Column) Alias() *string
func (Int64Column) Args ¶
func (c Int64Column) Args() []any
func (Int64Column) As ¶
func (c Int64Column) As(alias string) Int64Column
func (Int64Column) Between ¶
func (c Int64Column) Between(min, max int64) Expression
func (Int64Column) ColumnName ¶
func (c Int64Column) ColumnName() string
func (Int64Column) Eq ¶
func (c Int64Column) Eq(val int64) Expression
func (Int64Column) EqSub ¶
func (c Int64Column) EqSub(subQuery Expression) Expression
func (Int64Column) Gt ¶
func (c Int64Column) Gt(val int64) Expression
func (Int64Column) Gte ¶
func (c Int64Column) Gte(val int64) Expression
func (Int64Column) In ¶
func (c Int64Column) In(vals ...int64) Expression
func (Int64Column) InSub ¶
func (c Int64Column) InSub(subQuery Expression) Expression
func (Int64Column) IsNotNull ¶
func (c Int64Column) IsNotNull() Expression
func (Int64Column) IsNull ¶
func (c Int64Column) IsNull() Expression
func (Int64Column) Lt ¶
func (c Int64Column) Lt(val int64) Expression
func (Int64Column) Lte ¶
func (c Int64Column) Lte(val int64) Expression
func (Int64Column) NotEq ¶
func (c Int64Column) NotEq(val int64) Expression
func (Int64Column) NotEqSub ¶
func (c Int64Column) NotEqSub(subQuery Expression) Expression
func (Int64Column) NotIn ¶
func (c Int64Column) NotIn(vals ...int64) Expression
func (Int64Column) NotInSub ¶
func (c Int64Column) NotInSub(subQuery Expression) Expression
func (Int64Column) Sql ¶
func (c Int64Column) Sql() string
func (Int64Column) TableName ¶
func (c Int64Column) TableName() string
type IntColumn ¶
type IntColumn struct {
// contains filtered or unexported fields
}
func (IntColumn) Between ¶
func (c IntColumn) Between(min, max int) Expression
func (IntColumn) ColumnName ¶
func (IntColumn) Eq ¶
func (c IntColumn) Eq(val int) Expression
func (IntColumn) EqSub ¶
func (c IntColumn) EqSub(subQuery Expression) Expression
func (IntColumn) Gt ¶
func (c IntColumn) Gt(val int) Expression
func (IntColumn) Gte ¶
func (c IntColumn) Gte(val int) Expression
func (IntColumn) In ¶
func (c IntColumn) In(vals ...int) Expression
func (IntColumn) InSub ¶
func (c IntColumn) InSub(subQuery Expression) Expression
func (IntColumn) IsNotNull ¶
func (c IntColumn) IsNotNull() Expression
func (IntColumn) IsNull ¶
func (c IntColumn) IsNull() Expression
func (IntColumn) Lt ¶
func (c IntColumn) Lt(val int) Expression
func (IntColumn) Lte ¶
func (c IntColumn) Lte(val int) Expression
func (IntColumn) NotEq ¶
func (c IntColumn) NotEq(val int) Expression
func (IntColumn) NotEqSub ¶
func (c IntColumn) NotEqSub(subQuery Expression) Expression
func (IntColumn) NotIn ¶
func (c IntColumn) NotIn(vals ...int) Expression
func (IntColumn) NotInSub ¶
func (c IntColumn) NotInSub(subQuery Expression) Expression
type JSONB ¶
JSONB is the constraint for JSONBColumn type parameters. Types used with JSONBColumn must implement both sql.Scanner (for reading) and driver.Valuer (for writing).
type JSONBColumn ¶
type JSONBColumn[T JSONB] struct { // contains filtered or unexported fields }
func DefineJSONBColumn ¶
func DefineJSONBColumn[V JSONB, T any](t Table[T], name string) JSONBColumn[V]
JSONBColumn creates a typed JSONB column. Due to Go generics limitation, this is a standalone function, not a method. Usage: dew.JSONBColumn[MyType](t, "column_name")
func (JSONBColumn[T]) Alias ¶
func (c JSONBColumn[T]) Alias() *string
func (JSONBColumn[T]) Args ¶
func (c JSONBColumn[T]) Args() []any
func (JSONBColumn[T]) As ¶
func (c JSONBColumn[T]) As(alias string) JSONBColumn[T]
func (JSONBColumn[T]) ColumnName ¶
func (c JSONBColumn[T]) ColumnName() string
func (JSONBColumn[T]) ContainedBy ¶
func (c JSONBColumn[T]) ContainedBy(val T) Expression
ContainedBy checks if JSONB is contained by the given value (<@ operator)
func (JSONBColumn[T]) Contains ¶
func (c JSONBColumn[T]) Contains(val T) Expression
Contains checks if JSONB contains the given value (@> operator)
func (JSONBColumn[T]) Eq ¶
func (c JSONBColumn[T]) Eq(val T) Expression
func (JSONBColumn[T]) HasAllKeys ¶
func (c JSONBColumn[T]) HasAllKeys(keys ...string) Expression
HasAllKeys checks if JSONB has all of the given keys (?& operator)
func (JSONBColumn[T]) HasAnyKey ¶
func (c JSONBColumn[T]) HasAnyKey(keys ...string) Expression
HasAnyKey checks if JSONB has any of the given keys (?| operator)
func (JSONBColumn[T]) HasKey ¶
func (c JSONBColumn[T]) HasKey(key string) Expression
HasKey checks if JSONB has the given key (? operator)
func (JSONBColumn[T]) IsNotNull ¶
func (c JSONBColumn[T]) IsNotNull() Expression
func (JSONBColumn[T]) IsNull ¶
func (c JSONBColumn[T]) IsNull() Expression
func (JSONBColumn[T]) NotEq ¶
func (c JSONBColumn[T]) NotEq(val T) Expression
func (JSONBColumn[T]) Path ¶
func (c JSONBColumn[T]) Path(keys ...string) JSONBColumn[T]
Path returns a new JSONBColumn for nested path access (-> operator)
func (JSONBColumn[T]) PathText ¶
func (c JSONBColumn[T]) PathText(keys ...string) Column
PathText returns a StringColumn for text extraction (->> operator)
func (JSONBColumn[T]) Sql ¶
func (c JSONBColumn[T]) Sql() string
func (JSONBColumn[T]) TableName ¶
func (c JSONBColumn[T]) TableName() string
type MSSQLDialect ¶
type MSSQLDialect struct{}
func (MSSQLDialect) Placeholder ¶
func (d MSSQLDialect) Placeholder(index int) string
type MySQLDialect ¶
type MySQLDialect struct{}
func (MySQLDialect) Placeholder ¶
func (d MySQLDialect) Placeholder(index int) string
type PostgreSQLDialect ¶
type PostgreSQLDialect struct{}
func (PostgreSQLDialect) Placeholder ¶
func (d PostgreSQLDialect) Placeholder(index int) string
type Querier ¶
type Querier interface {
ExecContext(ctx context.Context, query string, args ...any) (sql.Result, error)
QueryContext(ctx context.Context, query string, args ...any) (*sql.Rows, error)
QueryRowContext(ctx context.Context, query string, args ...any) *sql.Row
// contains filtered or unexported methods
}
Querier is the common interface satisfied by both *DB and *Tx. It is unexported-method-sealed: only types in this package can implement it.
type RowScanner ¶
RowScanner allows a struct to define its own scanning logic instead of relying on reflection. Implement this interface on *T to use custom scanning.
func (u *User) ScanRow(rows *sql.Rows) error {
return rows.Scan(&u.ID, &u.Name, &u.Email)
}
type SQLiteDialect ¶
type SQLiteDialect struct{}
func (SQLiteDialect) Placeholder ¶
func (d SQLiteDialect) Placeholder(index int) string
type Selector ¶
type Selector[T any] struct { // contains filtered or unexported fields }
func (*Selector[T]) GroupBy ¶
func (s *Selector[T]) GroupBy(columns ...Expression) *Selector[T]
func (*Selector[T]) Having ¶
func (s *Selector[T]) Having(columns ...Expression) *Selector[T]
func (*Selector[T]) OrderBy ¶
func (s *Selector[T]) OrderBy(expr ...Expression) *Selector[T]
func (*Selector[T]) SkipLocked ¶
func (*Selector[T]) Where ¶
func (s *Selector[T]) Where(expr ...Expression) *Selector[T]
type SetQuery ¶
type SetQuery[T any] struct { // contains filtered or unexported fields }
func (*SetQuery[T]) Except ¶
func (sq *SetQuery[T]) Except(query Expression) *SetQuery[T]
func (*SetQuery[T]) Intersect ¶
func (sq *SetQuery[T]) Intersect(query Expression) *SetQuery[T]
func (*SetQuery[T]) OrderBy ¶
func (sq *SetQuery[T]) OrderBy(exprs ...Expression) *SetQuery[T]
func (*SetQuery[T]) Union ¶
func (sq *SetQuery[T]) Union(query Expression) *SetQuery[T]
func (*SetQuery[T]) UnionAll ¶
func (sq *SetQuery[T]) UnionAll(query Expression) *SetQuery[T]
type StringColumn ¶
type StringColumn struct {
// contains filtered or unexported fields
}
func (StringColumn) Alias ¶
func (c StringColumn) Alias() *string
func (StringColumn) Args ¶
func (c StringColumn) Args() []any
func (StringColumn) As ¶
func (c StringColumn) As(alias string) StringColumn
func (StringColumn) ColumnName ¶
func (c StringColumn) ColumnName() string
func (StringColumn) Eq ¶
func (c StringColumn) Eq(val string) Expression
func (StringColumn) EqSub ¶
func (c StringColumn) EqSub(subQuery Expression) Expression
func (StringColumn) In ¶
func (c StringColumn) In(vals ...string) Expression
func (StringColumn) InSub ¶
func (c StringColumn) InSub(subQuery Expression) Expression
func (StringColumn) IsNotNull ¶
func (c StringColumn) IsNotNull() Expression
func (StringColumn) IsNull ¶
func (c StringColumn) IsNull() Expression
func (StringColumn) Like ¶
func (c StringColumn) Like(val string) Expression
func (StringColumn) NotEq ¶
func (c StringColumn) NotEq(val string) Expression
func (StringColumn) NotEqSub ¶
func (c StringColumn) NotEqSub(subQuery Expression) Expression
func (StringColumn) NotIn ¶
func (c StringColumn) NotIn(vals ...string) Expression
func (StringColumn) NotInSub ¶
func (c StringColumn) NotInSub(subQuery Expression) Expression
func (StringColumn) NotLike ¶
func (c StringColumn) NotLike(val string) Expression
func (StringColumn) Sql ¶
func (c StringColumn) Sql() string
func (StringColumn) TableName ¶
func (c StringColumn) TableName() string
type Table ¶
type Table[T any] struct { // contains filtered or unexported fields }
func (Table[T]) BoolColumn ¶
func (t Table[T]) BoolColumn(name string) BoolColumn
func (Table[T]) BytesColumn ¶
func (t Table[T]) BytesColumn(name string) BytesColumn
func (Table[T]) DecimalColumn ¶
func (t Table[T]) DecimalColumn(name string) DecimalColumn
func (Table[T]) Float32Column ¶
func (t Table[T]) Float32Column(name string) Float32Column
func (Table[T]) FloatColumn ¶
func (t Table[T]) FloatColumn(name string) FloatColumn
func (Table[T]) Int64Column ¶
func (t Table[T]) Int64Column(name string) Int64Column
func (Table[T]) StringColumn ¶
func (t Table[T]) StringColumn(name string) StringColumn
func (Table[T]) TimeColumn ¶
func (t Table[T]) TimeColumn(name string) TimeColumn
func (Table[T]) UUIDColumn ¶
func (t Table[T]) UUIDColumn(name string) UUIDColumn
type TimeColumn ¶
type TimeColumn struct {
// contains filtered or unexported fields
}
func (TimeColumn) Alias ¶
func (c TimeColumn) Alias() *string
func (TimeColumn) Args ¶
func (c TimeColumn) Args() []any
func (TimeColumn) As ¶
func (c TimeColumn) As(alias string) TimeColumn
func (TimeColumn) Between ¶
func (c TimeColumn) Between(min, max time.Time) Expression
func (TimeColumn) ColumnName ¶
func (c TimeColumn) ColumnName() string
func (TimeColumn) Eq ¶
func (c TimeColumn) Eq(val time.Time) Expression
func (TimeColumn) EqSub ¶
func (c TimeColumn) EqSub(subQuery Expression) Expression
func (TimeColumn) Gt ¶
func (c TimeColumn) Gt(val time.Time) Expression
func (TimeColumn) Gte ¶
func (c TimeColumn) Gte(val time.Time) Expression
func (TimeColumn) In ¶
func (c TimeColumn) In(vals ...time.Time) Expression
func (TimeColumn) InSub ¶
func (c TimeColumn) InSub(subQuery Expression) Expression
func (TimeColumn) IsNotNull ¶
func (c TimeColumn) IsNotNull() Expression
func (TimeColumn) IsNull ¶
func (c TimeColumn) IsNull() Expression
func (TimeColumn) Lt ¶
func (c TimeColumn) Lt(val time.Time) Expression
func (TimeColumn) Lte ¶
func (c TimeColumn) Lte(val time.Time) Expression
func (TimeColumn) NotEq ¶
func (c TimeColumn) NotEq(val time.Time) Expression
func (TimeColumn) NotEqSub ¶
func (c TimeColumn) NotEqSub(subQuery Expression) Expression
func (TimeColumn) NotIn ¶
func (c TimeColumn) NotIn(vals ...time.Time) Expression
func (TimeColumn) NotInSub ¶
func (c TimeColumn) NotInSub(subQuery Expression) Expression
func (TimeColumn) Sql ¶
func (c TimeColumn) Sql() string
func (TimeColumn) TableName ¶
func (c TimeColumn) TableName() string
type UUIDColumn ¶
type UUIDColumn struct {
// contains filtered or unexported fields
}
func (UUIDColumn) Alias ¶
func (c UUIDColumn) Alias() *string
func (UUIDColumn) Args ¶
func (c UUIDColumn) Args() []any
func (UUIDColumn) As ¶
func (c UUIDColumn) As(alias string) UUIDColumn
func (UUIDColumn) ColumnName ¶
func (c UUIDColumn) ColumnName() string
func (UUIDColumn) Eq ¶
func (c UUIDColumn) Eq(val string) Expression
func (UUIDColumn) EqSub ¶
func (c UUIDColumn) EqSub(subQuery Expression) Expression
func (UUIDColumn) In ¶
func (c UUIDColumn) In(vals ...string) Expression
func (UUIDColumn) InSub ¶
func (c UUIDColumn) InSub(subQuery Expression) Expression
func (UUIDColumn) IsNotNull ¶
func (c UUIDColumn) IsNotNull() Expression
func (UUIDColumn) IsNull ¶
func (c UUIDColumn) IsNull() Expression
func (UUIDColumn) NotEq ¶
func (c UUIDColumn) NotEq(val string) Expression
func (UUIDColumn) NotEqSub ¶
func (c UUIDColumn) NotEqSub(subQuery Expression) Expression
func (UUIDColumn) NotIn ¶
func (c UUIDColumn) NotIn(vals ...string) Expression
func (UUIDColumn) NotInSub ¶
func (c UUIDColumn) NotInSub(subQuery Expression) Expression
func (UUIDColumn) Sql ¶
func (c UUIDColumn) Sql() string
func (UUIDColumn) TableName ¶
func (c UUIDColumn) TableName() string