Documentation
¶
Overview ¶
TODO:
Check if alias pointer is nil or not in As method
Index ¶
- Constants
- Variables
- func DefineSchema[T any, S any](tableName string, dialect Dialect, builder func(Table[T]) S) S
- type AGREGATE_FUNCTION_TYPE
- 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 Column
- type ConfilctInsertor
- func (i *ConfilctInsertor[T]) DoNothing() *ConfilctInsertor[T]
- func (i *ConfilctInsertor[T]) Exec(ctxs ...context.Context) error
- func (i *ConfilctInsertor[T]) ScanWith(scanner func(*sql.Rows) (*T, error), ctxs ...context.Context) ([]*T, error)
- func (i *ConfilctInsertor[T]) SetUpdate(col Column, val any) *ConfilctInsertor[T]
- func (i *ConfilctInsertor[T]) ToSql() (string, []any, error)
- type ConflictActionType
- type DB
- type Deletor
- func (d *Deletor[T]) Clone() *Deletor[T]
- func (d *Deletor[T]) Exec(ctxs ...context.Context) error
- func (d *Deletor[T]) Returning(cols ...Column) *Deletor[T]
- func (d *Deletor[T]) RowsAffected(ctxs ...context.Context) (int64, error)
- func (d *Deletor[T]) Scan(ctx context.Context, dest ...any) error
- func (d *Deletor[T]) ToSql() (string, []any, error)
- func (d *Deletor[T]) Where(expr ...Expression) *Deletor[T]
- type Dialect
- type Expression
- 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 Insertor
- func (i *Insertor[T]) Columns(cols ...Column) *Insertor[T]
- func (i *Insertor[T]) Exec(ctxs ...context.Context) error
- func (i *Insertor[T]) Models(models ...*T) *Insertor[T]
- func (i *Insertor[T]) OnConflict(cols ...Column) *ConfilctInsertor[T]
- func (i *Insertor[T]) Returning(cols ...Column) *Insertor[T]
- func (i *Insertor[T]) ScanWith(scanner func(*sql.Rows) (*T, error), ctxs ...context.Context) ([]*T, error)
- func (i *Insertor[T]) ToSql() (string, []any, error)
- func (i *Insertor[T]) Values(vals ...any) *Insertor[T]
- 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 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) StringColumn
- func (c JSONBColumn[T]) Sql() string
- func (c JSONBColumn[T]) TableName() string
- type MSSQLDialect
- type MySQLDialect
- type OPERATOR
- type PostgreSQLDialect
- 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]) 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]) 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]) Sql() string
- func (s *Selector[T]) ToSql() (string, []any)
- func (s *Selector[T]) Where(expr ...Expression) *Selector[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]) BoolColumn(name string) BoolColumn
- func (t Table[T]) Delete(db *DB) *Deletor[T]
- func (t Table[T]) FloatColumn(name string) FloatColumn
- func (t Table[T]) From(db *DB) *Selector[T]
- func (t Table[T]) Insert(db *DB) *Insertor[T]
- 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 *DB) *Updator[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 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 Updator
- func (u *Updator[T]) Clone() *Updator[T]
- func (u *Updator[T]) Exec(ctxs ...context.Context) error
- func (u *Updator[T]) Returning(cols ...Column) *Updator[T]
- func (u *Updator[T]) RowsAffected(ctxs ...context.Context) (int64, error)
- func (u *Updator[T]) Scan(ctx context.Context, dest ...any) error
- func (u *Updator[T]) ScanWith(scanner func(*sql.Rows) (*T, error), ctxs ...context.Context) ([]*T, error)
- func (u *Updator[T]) Set(col Column, val any) *Updator[T]
- func (u *Updator[T]) ToSql() (string, []any, error)
- func (u *Updator[T]) Where(expr ...Expression) *Updator[T]
Constants ¶
View Source
const ( InnerJoinType joinType = "INNER JOIN" LeftJoinType joinType = "LEFT JOIN" RightJoinType joinType = "RIGHT JOIN" )
Variables ¶
View Source
var (
ErrNotFound = errors.New("dew: record not found")
)
Functions ¶
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 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 Column ¶
type Column interface {
Expression
ColumnName() string
TableName() string
Alias() *string
}
func As ¶
func As(exp Expression, alias string) Column
func Avg ¶
func Avg(col Expression) Column
func Max ¶
func Max(col Expression) Column
func Min ¶
func Min(col Expression) Column
func Sum ¶
func Sum(col Expression) Column
type ConfilctInsertor ¶
func (*ConfilctInsertor[T]) DoNothing ¶
func (i *ConfilctInsertor[T]) DoNothing() *ConfilctInsertor[T]
func (*ConfilctInsertor[T]) Exec ¶
func (i *ConfilctInsertor[T]) Exec(ctxs ...context.Context) error
func (*ConfilctInsertor[T]) SetUpdate ¶
func (i *ConfilctInsertor[T]) SetUpdate(col Column, val any) *ConfilctInsertor[T]
type ConflictActionType ¶
type ConflictActionType string
const ( ConflictActionTypeNothing ConflictActionType = "NOTHING" ConflictActionTypeUpdate ConflictActionType = "UPDATE" )
type Deletor ¶
type Deletor[T any] struct { // contains filtered or unexported fields }
func (*Deletor[T]) RowsAffected ¶
func (*Deletor[T]) Where ¶
func (d *Deletor[T]) Where(expr ...Expression) *Deletor[T]
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 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 Insertor ¶
type Insertor[T any] struct { // contains filtered or unexported fields }
func (*Insertor[T]) OnConflict ¶
func (i *Insertor[T]) OnConflict(cols ...Column) *ConfilctInsertor[T]
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 JSONBColumn ¶
type JSONBColumn[T any] struct { // contains filtered or unexported fields }
func DefineJSONBColumn ¶
func DefineJSONBColumn[V any, 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) StringColumn
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 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]) Where ¶
func (s *Selector[T]) Where(expr ...Expression) *Selector[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]) FloatColumn ¶
func (t Table[T]) FloatColumn(name string) FloatColumn
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
Source Files
¶
Click to show internal directories.
Click to hide internal directories.