xgorm

package
v0.0.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 12, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

* @Date: 2023-07-20 10:09:47 * @LastEditTime: 2023-07-20 10:16:49 * @Description:

* @Date: 2023-07-20 10:07:02 * @LastEditTime: 2023-07-20 10:17:25 * @Description:

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewGormWithCache

func NewGormWithCache(dialector gorm.Dialector, store xcache.Store, opts ...gorm.Option) (db *gorm.DB, err error)

Types

type GormTransactionRepository

type GormTransactionRepository interface {
	gormrepository.TransactionRepository
	FindWhere(target interface{}, filters map[string]interface{}, preloads ...string) error
	DeleteWhere(target interface{}, filters map[string]interface{}) error
	FindWhereBatch(target interface{}, filters map[string]interface{}, limit, offset int, orderBy string, preloads ...string) error
	FindWhereCount(target interface{}, filters map[string]interface{}) int64
	UpdateWhere(target interface{}, filters map[string]interface{}, updates interface{}, preloads ...string) error
}

func NewGormRepository

func NewGormRepository(db *gorm.DB, logger *logrus.Logger, debug bool, useCache bool, cacheTtl time.Duration, cachePrefix string, defaultJoins ...string) GormTransactionRepository

NewGormRepository returns a new base repository that implements TransactionRepository

type NullType

type NullType byte
const (

	// IsNull the same as `is null`
	IsNull NullType
	// IsNotNull the same as `is not null`
	IsNotNull
)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL