gorm

package
v1.17.1 Latest Latest
Warning

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

Go to latest
Published: Jan 19, 2023 License: MIT Imports: 12 Imported by: 0

Documentation

Overview

Package gorm some useful tools for gorm

Index

Constants

This section is empty.

Variables

View Source
var (
	// NewGormLogger new gorm logger
	//
	// Deprecated: use NewLogger instead
	NewGormLogger = NewLogger
)

Functions

This section is empty.

Types

type GormLogger deprecated

type GormLogger Logger

GormLogger gorm logger

Deprecated: use Logger instead

type GzText

type GzText string

GzText store string with gzip into blob

func (*GzText) Scan

func (j *GzText) Scan(value interface{}) error

Scan db -> val

func (GzText) Value

func (j GzText) Value() (driver.Value, error)

Value val -> db

type JSON

type JSON []byte

JSON store json into blob

func (JSON) Equals

func (j JSON) Equals(j1 JSON) bool

func (JSON) IsNull

func (j JSON) IsNull() bool

func (JSON) Marshal

func (j JSON) Marshal() ([]byte, error)

func (*JSON) Scan

func (j *JSON) Scan(value interface{}) error

Scan db -> val

func (*JSON) Unmarshal

func (j *JSON) Unmarshal(data []byte) error

func (JSON) Value

func (j JSON) Value() (driver.Value, error)

Value val -> db

type Logger

type Logger struct {
	// contains filtered or unexported fields
}

Logger colored logger for gorm

func NewLogger

func NewLogger(formatter func(...interface{}) []interface{}, logger loggerItf) *Logger

NewLogger new gorm sql logger

func (*Logger) Print

func (l *Logger) Print(vs ...interface{})

Print print sql logger

Jump to

Keyboard shortcuts

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