Documentation ¶
Index ¶
- func And(children ...models.IClause) models.IClause
- func Between(field string, from, to any, includeEdgeTo ...bool) models.IClause
- func Count[T any](tx *gorm.DB, cls models.IClause) (int64, error)
- func Delete[T any](tx *gorm.DB, record *T) error
- func DeleteAll[T any](tx *gorm.DB, records []T) error
- func DeleteBy[T any](tx *gorm.DB, cls models.IClause) error
- func Eq(field string, value any) models.IClause
- func FindAll[T any](tx *gorm.DB, cls models.IClause) ([]T, error)
- func FindAllComplex[T any](tx *gorm.DB, cls models.IClause, p models.IPagination, s models.ISorting) ([]T, models.IPagination, error)
- func FindOne[T any](tx *gorm.DB, cls models.IClause) (*T, error)
- func Gt(field string, value any) models.IClause
- func Gte(field string, value any) models.IClause
- func In(field string, value ...any) models.IClause
- func IsNotNull(field string) models.IClause
- func IsNull(field string) models.IClause
- func Like(field string, value any) models.IClause
- func Lt(field string, value any) models.IClause
- func Lte(field string, value any) models.IClause
- func Neq(field string, value any) models.IClause
- func NotBetween(field string, from, to any, includeEdgeTo ...bool) models.IClause
- func NotIn(field string, value ...any) models.IClause
- func NotLike(field string, value any) models.IClause
- func NotSimilar(field string, value any) models.IClause
- func Or(children ...models.IClause) models.IClause
- func Paginate(page, size int) models.IPagination
- func Save[T any](tx *gorm.DB, record *T) (*T, error)
- func SaveAll[T any](tx *gorm.DB, records []T) ([]T, error)
- func Similar(field string, value any) models.IClause
- func Sort(by string, asc bool) models.ISorting
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FindAllComplex ¶
func FindAllComplex[T any](tx *gorm.DB, cls models.IClause, p models.IPagination, s models.ISorting) ([]T, models.IPagination, error)
FindAllComplex finds all records from the database with pagination and sorting.
func NotBetween ¶
NotBetween creates a new clause that checks if a field is not between two values.
func NotSimilar ¶
NotSimilar creates a new clause with operator "NOT LIKE" and the value "%value%".
func Paginate ¶
func Paginate(page, size int) models.IPagination
Paginate creates a new models.IPagination.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.