Documentation ¶
Index ¶
- func Builder() *builder.Builder
- func Close()
- func Delete[T any](q *Query[T]) error
- func DeleteById[T any](id any) (int64, error)
- func DeleteByIds[T any](ids any) error
- func Engine() (*xorm.Engine, error)
- func GetById[T any](id any) (*T, bool, error)
- func Insert[T any](obj *T) (int64, error)
- func InsertBatch[T any](objs ...*T) (int64, error)
- func NewEngineWithConfig(cfg *Config) (err error)
- func SelectById[T any](id any) (*T, error)
- func SelectByIds[T any](ids any) ([]*T, error)
- func SelectExist[T any](q *Query[T]) (bool, error)
- func SelectList[T any](q *Query[T]) ([]*T, error)
- func SelectListModel[T any, R any](q *Query[T]) ([]*R, error)
- func SelectListModelWithTableName[T any](tableName string, q *Query[T]) ([]*T, error)
- func SelectOne[T any](q *Query[T]) (*T, error)
- func SelectOneModel[T any, R any](q *Query[T]) (*R, error)
- func SelectOneModelWithTableName[T any](tableName string, q *Query[T]) (*T, error)
- func SelectSubExistList[T any](q *Query[T], f func(sub *Query[T])) ([]*T, error)
- func SelectSubExistOne[T any](q *Query[T], f func(sub *Query[T])) (*T, error)
- func SelectSumInt[T any](q *Query[T], fields string) (int64, error)
- func SetLogger(logger core.ILogger)
- func Transaction(f SessionFunc) error
- func Update[T any](obj *T, cols ...string) (int64, error)
- func UpdateById[T any](id any, entity *T) (int64, error)
- func UpdateFields[T any](q *Query[T], entity *T) (int64, error)
- type Config
- type Page
- type Query
- func (q *Query[T]) Alias(alias string) *Query[T]
- func (q *Query[T]) AllEq(m map[string]interface{}, isAnd ...bool) *Query[T]
- func (q *Query[T]) And(f func(q *Query[T])) *Query[T]
- func (q *Query[T]) Between(column string, start, end interface{}) *Query[T]
- func (q *Query[T]) Cols(columns ...string) *Query[T]
- func (q *Query[T]) Count(bean T) (int64, error)
- func (q *Query[T]) Eq(column string, value interface{}) *Query[T]
- func (q *Query[T]) Exists(f func(q *Query[T])) *Query[T]
- func (q *Query[T]) Find(beans []*T) ([]*T, error)
- func (q *Query[T]) Func(f func(q *Query[T]) *Query[T]) *Query[T]
- func (q *Query[T]) Ge(column string, value interface{}) *Query[T]
- func (q *Query[T]) Get(bean *T) (bool, error)
- func (q *Query[T]) GroupBy(keys string) *Query[T]
- func (q *Query[T]) Gt(column string, value interface{}) *Query[T]
- func (q *Query[T]) Having(condition string) *Query[T]
- func (q *Query[T]) In(column string, values interface{}) *Query[T]
- func (q *Query[T]) InBuilder(column string, builder *builder.Builder) *Query[T]
- func (q *Query[T]) IsNotNull(column string) *Query[T]
- func (q *Query[T]) IsNull(column string) *Query[T]
- func (q *Query[T]) Join(joinType string, tableName interface{}, condition string, args ...interface{}) *Query[T]
- func (q *Query[T]) Le(column string, value interface{}) *Query[T]
- func (q *Query[T]) Like(column string, value interface{}) *Query[T]
- func (q *Query[T]) LikeLeft(column string, value interface{}) *Query[T]
- func (q *Query[T]) LikeRight(column string, value interface{}) *Query[T]
- func (q *Query[T]) Limit(count int) *Query[T]
- func (q *Query[T]) Lt(column string, value interface{}) *Query[T]
- func (q *Query[T]) Ne(column string, value interface{}) *Query[T]
- func (q *Query[T]) NotBetween(column string, start, end interface{}) *Query[T]
- func (q *Query[T]) NotIn(column string, values interface{}) *Query[T]
- func (q *Query[T]) NotInBuilder(column string, builder *builder.Builder) *Query[T]
- func (q *Query[T]) NotLike(column string, value interface{}) *Query[T]
- func (q *Query[T]) NotLikeLeft(column string, pattern string) *Query[T]
- func (q *Query[T]) NotLikeRight(column string, pattern string) *Query[T]
- func (q *Query[T]) Or(f func(q *Query[T])) *Query[T]
- func (q *Query[T]) OrderBy(order string) *Query[T]
- func (q *Query[T]) Paginate(page, pageSize int) *Query[T]
- func (q *Query[T]) Select(columns string) *Query[T]
- func (q *Query[T]) SetExpr(column string, expression string) *Query[T]
- func (q *Query[T]) Skip(count int) *Query[T]
- func (q *Query[T]) Where(condition string, args ...interface{}) *Query[T]
- type SessionFunc
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DeleteByIds ¶
func InsertBatch ¶
func NewEngineWithConfig ¶
func SelectById ¶
func SelectByIds ¶
func SelectList ¶
func SelectSubExistList ¶
func SelectSubExistOne ¶
func Transaction ¶
func Transaction(f SessionFunc) error
Types ¶
type Page ¶
func SelectPageModel ¶
type Query ¶
type Query[T any] struct { // contains filtered or unexported fields }
func (*Query[T]) NotBetween ¶
func (*Query[T]) NotInBuilder ¶
func (*Query[T]) NotLikeLeft ¶
func (*Query[T]) NotLikeRight ¶
type SessionFunc ¶
Click to show internal directories.
Click to hide internal directories.