Documentation ¶
Index ¶
- func FileWithLineNum() string
- func GetDsn(connection string) (string, error)
- func New(writer logger.Writer, config logger.Config) logger.Interface
- func NewGorm(ctx context.Context, connection string) (contractsorm.DB, error)
- func NewGormInstance(connection string) (*gorm.DB, error)
- func NewOrm() contractsorm.Orm
- type Application
- type DB
- type Gorm
- func (r *Gorm) Begin() (contractsorm.Transaction, error)
- func (r *Gorm) Commit() error
- func (r *Gorm) Count(count *int64) error
- func (r *Gorm) Create(value interface{}) error
- func (r *Gorm) Delete(value interface{}, conds ...interface{}) error
- func (r *Gorm) Exec(sql string, values ...interface{}) error
- func (r *Gorm) Find(dest interface{}, conds ...interface{}) error
- func (r *Gorm) First(dest interface{}) error
- func (r *Gorm) FirstOrCreate(dest interface{}, conds ...interface{}) error
- func (r *Gorm) ForceDelete(value interface{}, conds ...interface{}) error
- func (r *Gorm) Get(dest interface{}) error
- func (r *Gorm) Group(name string) contractsorm.Query
- func (r *Gorm) Having(query interface{}, args ...interface{}) contractsorm.Query
- func (r *Gorm) Join(query string, args ...interface{}) contractsorm.Query
- func (r *Gorm) Limit(limit int) contractsorm.Query
- func (r *Gorm) Model(value interface{}) contractsorm.Query
- func (r *Gorm) Offset(offset int) contractsorm.Query
- func (r *Gorm) OrWhere(query interface{}, args ...interface{}) contractsorm.Query
- func (r *Gorm) Order(value interface{}) contractsorm.Query
- func (r *Gorm) Pluck(column string, dest interface{}) error
- func (r *Gorm) Raw(sql string, values ...interface{}) contractsorm.Query
- func (r *Gorm) Rollback() error
- func (r *Gorm) Save(value interface{}) error
- func (r *Gorm) Scan(dest interface{}) error
- func (r *Gorm) Scopes(funcs ...func(contractsorm.Query) contractsorm.Query) contractsorm.Query
- func (r *Gorm) Select(query interface{}, args ...interface{}) contractsorm.Query
- func (r *Gorm) Table(name string, args ...interface{}) contractsorm.Query
- func (r *Gorm) Update(column string, value interface{}) error
- func (r *Gorm) Updates(values interface{}) error
- func (r *Gorm) Where(query interface{}, args ...interface{}) contractsorm.Query
- func (r *Gorm) WithTrashed() contractsorm.Query
- type Logger
- func (l Logger) Error(ctx context.Context, msg string, data ...interface{})
- func (l Logger) Info(ctx context.Context, msg string, data ...interface{})
- func (l *Logger) LogMode(level logger.LogLevel) logger.Interface
- func (l Logger) Trace(ctx context.Context, begin time.Time, fc func() (string, int64), err error)
- func (l Logger) Warn(ctx context.Context, msg string, data ...interface{})
- type Orm
- type ServiceProvider
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FileWithLineNum ¶ added in v1.0.0
func FileWithLineNum() string
FileWithLineNum return the file name and line number of the current file
func NewOrm ¶ added in v1.0.0
func NewOrm() contractsorm.Orm
Types ¶
type Application ¶
type Application struct { }
func (*Application) Init ¶
func (app *Application) Init() orm.Orm
type Gorm ¶ added in v1.0.0
type Gorm struct {
// contains filtered or unexported fields
}
func (*Gorm) Begin ¶ added in v1.0.0
func (r *Gorm) Begin() (contractsorm.Transaction, error)
func (*Gorm) FirstOrCreate ¶ added in v1.0.0
func (*Gorm) ForceDelete ¶ added in v1.0.0
func (*Gorm) Having ¶ added in v1.0.0
func (r *Gorm) Having(query interface{}, args ...interface{}) contractsorm.Query
func (*Gorm) Join ¶ added in v1.0.0
func (r *Gorm) Join(query string, args ...interface{}) contractsorm.Query
func (*Gorm) Model ¶ added in v1.0.0
func (r *Gorm) Model(value interface{}) contractsorm.Query
func (*Gorm) OrWhere ¶ added in v1.0.0
func (r *Gorm) OrWhere(query interface{}, args ...interface{}) contractsorm.Query
func (*Gorm) Order ¶ added in v1.0.0
func (r *Gorm) Order(value interface{}) contractsorm.Query
func (*Gorm) Raw ¶ added in v1.0.0
func (r *Gorm) Raw(sql string, values ...interface{}) contractsorm.Query
func (*Gorm) Scopes ¶ added in v1.0.0
func (r *Gorm) Scopes(funcs ...func(contractsorm.Query) contractsorm.Query) contractsorm.Query
func (*Gorm) Select ¶ added in v1.0.0
func (r *Gorm) Select(query interface{}, args ...interface{}) contractsorm.Query
func (*Gorm) Table ¶ added in v1.0.0
func (r *Gorm) Table(name string, args ...interface{}) contractsorm.Query
func (*Gorm) Where ¶ added in v1.0.0
func (r *Gorm) Where(query interface{}, args ...interface{}) contractsorm.Query
func (*Gorm) WithTrashed ¶ added in v1.0.0
func (r *Gorm) WithTrashed() contractsorm.Query
type Logger ¶ added in v1.0.0
type Orm ¶ added in v1.0.0
type Orm struct {
// contains filtered or unexported fields
}
func (*Orm) Connection ¶ added in v1.0.0
func (r *Orm) Connection(name string) contractsorm.Orm
func (*Orm) Query ¶ added in v1.0.0
func (r *Orm) Query() contractsorm.DB
func (*Orm) Transaction ¶ added in v1.0.0
func (r *Orm) Transaction(txFunc func(tx contractsorm.Transaction) error) error
func (*Orm) WithContext ¶ added in v1.0.0
func (r *Orm) WithContext(ctx context.Context) contractsorm.Orm
type ServiceProvider ¶
type ServiceProvider struct { }
func (*ServiceProvider) Boot ¶
func (database *ServiceProvider) Boot()
func (*ServiceProvider) Register ¶
func (database *ServiceProvider) Register()
Source Files ¶
Click to show internal directories.
Click to hide internal directories.