Versions in this module Expand all Collapse all v1 v1.1.17 Dec 8, 2023 v1.1.16 Nov 13, 2023 Changes in this version + const OPERATOR_AND + const OPERATOR_EQUAL + const OPERATOR_GREATER + const OPERATOR_GREATER_EQUAL + const OPERATOR_IN + const OPERATOR_IS_NOT_NULL + const OPERATOR_IS_NULL + const OPERATOR_LESS + const OPERATOR_LESS_EQUAL + const OPERATOR_LIKE + const OPERATOR_NOT_EQUAL + const OPERATOR_NOT_IN + const OPERATOR_NOT_LIKE + const OPERATOR_OR + func Connect(silent ...bool) *connector + func Count[T any](tx *gorm.DB, clause *Clause) (int64, error) + func DeleteAllByClause[T any](tx *gorm.DB, clause *Clause) error + func DeleteAll[T any](tx *gorm.DB, models []T) error + func Delete[T any](tx *gorm.DB, model *T) error + func FindAll[T any](tx *gorm.DB, clause *Clause) ([]T, error) + func FindOne[T any](tx *gorm.DB, clause *Clause) (*T, error) + func SaveAll[T any](tx *gorm.DB, models []T) ([]T, error) + func Save[T any](tx *gorm.DB, model *T) (*T, error) + type Clause struct + Children []*Clause + Field string + Operator string + Value interface{} + func And(children ...*Clause) *Clause + func Eq(field string, value interface{}) *Clause + func Gt(field string, value interface{}) *Clause + func Gte(field string, value interface{}) *Clause + func In(field string, value ...interface{}) *Clause + func IsNotNull(field string) *Clause + func IsNull(field string) *Clause + func Like(field string, value interface{}) *Clause + func Lt(field string, value interface{}) *Clause + func Lte(field string, value interface{}) *Clause + func Neq(field string, value interface{}) *Clause + func NewClause(field, operator string, value interface{}, children ...*Clause) *Clause + func NotIn(field string, value ...interface{}) *Clause + func NotLike(field string, value interface{}) *Clause + func NotSimilar(field string, value string) *Clause + func Or(children ...*Clause) *Clause + func Similar(field string, value string) *Clause + func (c *Clause) Build() (string, []interface{}) + func (s *Clause) Consume(tx *gorm.DB) *gorm.DB + type Pagination struct + Page int + Size int + Total int64 + func FindAllComplex[T any](tx *gorm.DB, clause *Clause, sort *Sort, pagination *Pagination) ([]T, *Pagination, error) + func Page(page int, size int) *Pagination + func (p *Pagination) Consume(tx *gorm.DB) *gorm.DB + type Sort struct + Asc bool + By string + func Order(by string, asc bool) *Sort + func (s *Sort) Consume(tx *gorm.DB) *gorm.DB v1.1.15 Nov 13, 2023 v1.1.14 Aug 10, 2023 v1.1.13 Aug 10, 2023 v1.1.12 Aug 10, 2023 v1.1.11 Aug 10, 2023 v1.1.10 Aug 10, 2023 v1.1.9 Aug 10, 2023 v1.1.8 Aug 10, 2023 v1.1.7 Aug 10, 2023 v1.1.6 Aug 10, 2023 v1.1.5 Aug 10, 2023 v1.1.4 Jul 28, 2023 v1.1.3 Jul 26, 2023 v1.1.2 Jul 26, 2023 v1.1.1 Jul 12, 2023 v1.1.0 May 23, 2023 v1.0.0 May 4, 2023