postgresqlx

package
v0.0.0-...-fefde71 Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2024 License: GPL-3.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewClient

func NewClient(app *configx.Application) (*gorm.DB, error)

NewClient init mysql client.

func NewOrderRepo

func NewOrderRepo(rw *gorm.DB, node *snowflake.Node) repo.IOrderRepo

NewOrderRepo create and return a new gormOrderRepo.

Types

type TimestampSerializer

type TimestampSerializer struct{}

TimestampSerializer handles serialization for google.protobuf.Timestamp

func (TimestampSerializer) Scan

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

Scan converts database value to google.protobuf.Timestamp

func (TimestampSerializer) Value

func (ts TimestampSerializer) Value(
	c context.Context,
	field *schema.Field,
	dst reflect.Value,
	fieldValue interface{},
) (interface{}, error)

Value converts google.protobuf.Timestamp to time.Time for database

Jump to

Keyboard shortcuts

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