postgres

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Apr 14, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewPostgresBaseRepo

func NewPostgresBaseRepo[C, U, G any](config config.PostgresConfig) config.IBaseRepo[C, U, G]

Types

type BaseRepo

type BaseRepo[C, U, G any] struct {
	PrimaryKey string `json:"primary_key"`
	Table      string `json:"table"`
	// contains filtered or unexported fields
}

func (*BaseRepo[C, U, G]) ChangeStatus

func (b *BaseRepo[C, U, G]) ChangeStatus(entity_id, status int64, success func(), failure func(record int64))

func (*BaseRepo[C, U, G]) Create

func (b *BaseRepo[C, U, G]) Create(dat C, success func(id int64), failure func(record int64))

func (*BaseRepo[C, U, G]) DeleteOne

func (b *BaseRepo[C, U, G]) DeleteOne(entity_id int64, success func(), failure func(record int64))

func (*BaseRepo[C, U, G]) GetOne

func (b *BaseRepo[C, U, G]) GetOne(entity_id int64, success func(data G), failure func(record int64), sub_queries ...config.SubQuery)

func (*BaseRepo[C, U, G]) Update

func (b *BaseRepo[C, U, G]) Update(entity_id int64, dat U, success func(), failure func(record int64))

Jump to

Keyboard shortcuts

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