Versions in this module Expand all Collapse all v0 v0.1.4 Aug 24, 2025 v0.1.3 Aug 20, 2025 v0.1.2 Aug 6, 2025 v0.1.1 Aug 4, 2025 v0.1.0 Aug 4, 2025 Changes in this version + func BuildQuery(f any) (string, []any) + func Count(ctx context.Context, v schema.Tabler, f Filter) (total int64, err error) + func Create(ctx context.Context, v any) error + func Delete(ctx context.Context, m schema.Tabler, f Filter) (int64, error) + func EscapeField(field string) string + func Find(ctx context.Context, f Filter, v any) error + func FindOne(ctx context.Context, f Filter, v any) error + func GetDB(ctx context.Context) *gorm.DB + func HasNextPage(total int64, page int64, pageSize int64) bool + func HasRecrods(total int64, page int64, pageSize int64) bool + func Init(cfg Config) + func IsDbError(err error) bool + func IsRecordNotFound(err error) bool + func Save(ctx context.Context, v any) error + func Update(ctx context.Context, m schema.Tabler, v any) error + func Updates(ctx context.Context, m schema.Tabler, f Filter, v any) (int64, error) + type BaseFilter struct + Fields string + OrderBy string + Page int64 + PageSize int64 + func NewBaseFilter(page, size int, orderBy string) BaseFilter + func (f BaseFilter) GetFields() string + func (f BaseFilter) GetOrder() string + func (f BaseFilter) GetPage() int64 + func (f BaseFilter) GetPageSize() int64 + func (f BaseFilter) HasNextPage(total int64) bool + type Config struct + Host string + Name string + Password string + Port int + Type string + User string + type F struct + Op string + Value T + func Eq[T any](v T) F[T] + func Gt[T any](v T) F[T] + func Gte[T any](v T) F[T] + func In[T any](v []T) F[[]T] + func Like[T any](v T) F[T] + func Lt[T any](v T) F[T] + func Lte[T any](v T) F[T] + func NewEmptyF[T any](v T) F[T] + func NewF[T any](op string, value T) F[T] + func NotEq[T any](v T) F[T] + func NotIn[T any](v []T) F[[]T] + func NotLike[T any](v T) F[T] + func OmitEq[T any](v T) F[T] + func OmitGt[T any](v T) F[T] + func OmitGte[T any](v T) F[T] + func OmitIn[T any](v []T) F[[]T] + func OmitLike[T any](v T) F[T] + func OmitLt[T any](v T) F[T] + func OmitLte[T any](v T) F[T] + func OmitNotEq[T any](v T) F[T] + func OmitNotIn[T any](v []T) F[[]T] + func OmitNotLike[T any](v T) F[T] + func Omit[T any](v T, fn func(T) F[T]) F[T] + func Omits[T any](v []T, fn func([]T) F[[]T]) F[[]T] + type Filter interface + GetFields func() string + GetOrder func() string + GetPage func() int64 + GetPageSize func() int64 + HasNextPage func(total int64) bool + type Model struct + CreatedAt time.Time + ID int64 + UpdatedAt time.Time