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

# 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)}
}

# Packages

No description provided by the author

# Functions

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
WithAlwaysOmitVariables will omit variables from the span attributes.
WithDatabaseName specified the database name to be used in span names since its not possible to extract this information from gorm.
No description provided by the author
WithDriver set gorm-driver.
WithLogger set gorm-logger and has debug logger writer..
WithLogHelper set gorm-logger and log filters..
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
WithTracerProvider sets the tracer provider to use for opentelemetry.
WithTracing set gorm-tracing.
WithTracingOpts set gorm-tracing some opts.

# Variables

No description provided by the author

# Structs

Config a gorm custom config.
No description provided by the author
No description provided by the author

# Interfaces

No description provided by the author
TraceOption allows for managing options for the tracing plugin.
No description provided by the author

# Type aliases

No description provided by the author
No description provided by the author