db

package
v0.0.0-...-74b72eb Latest Latest
Warning

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

Go to latest
Published: Sep 2, 2025 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DateOnly

type DateOnly struct {
	time.Time
}

func (*DateOnly) MarshalJSON

func (t *DateOnly) MarshalJSON() ([]byte, error)

func (*DateOnly) Scan

func (t *DateOnly) Scan(v interface{}) error

func (*DateOnly) ToString

func (t *DateOnly) ToString() string

func (*DateOnly) UnmarshalJSON

func (t *DateOnly) UnmarshalJSON(data []byte) (err error)

func (*DateOnly) Value

func (t *DateOnly) Value() (driver.Value, error)

type DateTime

type DateTime struct {
	time.Time
}

func (*DateTime) MarshalJSON

func (t *DateTime) MarshalJSON() ([]byte, error)

func (*DateTime) Scan

func (t *DateTime) Scan(v interface{}) error

func (*DateTime) ToString

func (t *DateTime) ToString() string

func (*DateTime) UnmarshalJSON

func (t *DateTime) UnmarshalJSON(data []byte) (err error)

func (*DateTime) Value

func (t *DateTime) Value() (driver.Value, error)

type GormLogger

type GormLogger struct {
	logger.Config
	// contains filtered or unexported fields
}

func NewGormLogger

func NewGormLogger(config logger.Config, fileOutPut string) *GormLogger

func (*GormLogger) Error

func (l *GormLogger) Error(ctx context.Context, s string, args ...interface{})

func (*GormLogger) Info

func (l *GormLogger) Info(ctx context.Context, s string, args ...interface{})

func (*GormLogger) LogMode

func (*GormLogger) Trace

func (l *GormLogger) Trace(ctx context.Context, begin time.Time, fc func() (string, int64), err error)

func (*GormLogger) Warn

func (l *GormLogger) Warn(ctx context.Context, s string, args ...interface{})

type SliceToStringSerializer

type SliceToStringSerializer struct {
}

func (SliceToStringSerializer) Scan

func (SliceToStringSerializer) Scan(ctx context.Context, field *schema.Field, dst reflect.Value, dbValue interface{}) (err error)

Scan 实现 Scan 方法

func (SliceToStringSerializer) Value

func (SliceToStringSerializer) Value(ctx context.Context, field *schema.Field, dst reflect.Value, fieldValue interface{}) (interface{}, error)

Value 实现 Value 方法

type TimeOnly

type TimeOnly struct {
	time.Time
}

func (*TimeOnly) MarshalJSON

func (t *TimeOnly) MarshalJSON() ([]byte, error)

func (*TimeOnly) Scan

func (t *TimeOnly) Scan(v interface{}) error

func (*TimeOnly) ToString

func (t *TimeOnly) ToString() string

func (*TimeOnly) UnmarshalJSON

func (t *TimeOnly) UnmarshalJSON(data []byte) (err error)

func (*TimeOnly) Value

func (t *TimeOnly) Value() (driver.Value, error)

Jump to

Keyboard shortcuts

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