package
1.0.9
Repository: https://github.com/omalloc/contrib.git
Documentation: pkg.go.dev

# Packages

No description provided by the author

# README

Kratos ORM

Kratos ORM is a GORM for Kratos Framework.

  • Support OpenTelemetry (Statement.SkipHooks skip the reporting if not recording)

Installation

with cgo

Docs

$ go get -u gorm.io/driver/sqlite

without cgo

Docs

$ go get -u github.com/glebarez/sqlite

Usage

crud

type MyModel struct {
    ID int64
    Name string

    crud.DBModel
}

// or interface.
type myRepo struct {
    crud.CRUD[MyModel]
}

func NewMyRepo(db *gorm.DB) *myRepo {
    return &myRepo{crud.New(db)}
}