Documentation ¶
Index ¶
- func ConvertStatus(status int64, status_type string) interface{}
- type IBaseRepo
- type PGXBaseRepo
- func (b *PGXBaseRepo[C, U, G]) ChangeStatus(entity_id, status int64, success func(), failure func(record int64))
- func (b *PGXBaseRepo[C, U, G]) Create(dat C, success func(id int64), failure func(record int64))
- func (b *PGXBaseRepo[C, U, G]) DeleteOne(entity_id int64, success func(), failure func(record int64))
- func (b *PGXBaseRepo[C, U, G]) GetOne(entity_id int64, success func(data G), failure func(record int64), ...)
- func (b *PGXBaseRepo[C, U, G]) Update(entity_id int64, dat U, success func(), failure func(record int64))
- type PQBaseRepo
- func (b *PQBaseRepo[C, U, G]) ChangeStatus(entity_id, status int64, success func(), failure func(record int64))
- func (b *PQBaseRepo[C, U, G]) Create(dat C, success func(id int64), failure func(record int64))
- func (b *PQBaseRepo[C, U, G]) DeleteOne(entity_id int64, success func(), failure func(record int64))
- func (b *PQBaseRepo[C, U, G]) GetOne(entity_id int64, success func(data G), failure func(record int64), ...)
- func (b *PQBaseRepo[C, U, G]) Update(entity_id int64, dat U, success func(), failure func(record int64))
- type SQLXBaseRepo
- func (b *SQLXBaseRepo[C, U, G]) ChangeStatus(entity_id, status int64, success func(), failure func(record int64))
- func (b *SQLXBaseRepo[C, U, G]) Create(dat C, success func(id int64), failure func(record int64))
- func (b *SQLXBaseRepo[C, U, G]) DeleteOne(entity_id int64, success func(), failure func(record int64))
- func (b *SQLXBaseRepo[C, U, G]) GetOne(entity_id int64, success func(data G), failure func(record int64), ...)
- func (b *SQLXBaseRepo[C, U, G]) Update(entity_id int64, dat U, success func(), failure func(record int64))
- type SubQuery
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConvertStatus ¶
Types ¶
type IBaseRepo ¶
type IBaseRepo[C, U, G any] interface { Create(C, func(id int64), func(record int64)) Update(int64, U, func(), func(int64)) GetOne(int64, func(G), func(int64), ...SubQuery) DeleteOne(int64, func(), func(int64)) ChangeStatus(int64, int64, func(), func(int64)) }
func NewPGXBaseRepo ¶
func NewPGXBaseRepo[C, U, G any](config config.PGXBaseRepoConfig) IBaseRepo[C, U, G]
func NewPQBaseRepo ¶
func NewPQBaseRepo[C, U, G any](config config.PQBaseRepoConfig) IBaseRepo[C, U, G]
func NewSQLXBaseRepo ¶
func NewSQLXBaseRepo[C, U, G any](config config.SQLXBaseRepoConfig) IBaseRepo[C, U, G]
type PGXBaseRepo ¶
type PGXBaseRepo[C, U, G any] struct { PrimaryKey string `json:"primary_key"` Schema string `json:"schema"` Table string `json:"table"` // contains filtered or unexported fields }
func (*PGXBaseRepo[C, U, G]) ChangeStatus ¶
func (b *PGXBaseRepo[C, U, G]) ChangeStatus(entity_id, status int64, success func(), failure func(record int64))
func (*PGXBaseRepo[C, U, G]) Create ¶
func (b *PGXBaseRepo[C, U, G]) Create(dat C, success func(id int64), failure func(record int64))
func (*PGXBaseRepo[C, U, G]) DeleteOne ¶
func (b *PGXBaseRepo[C, U, G]) DeleteOne(entity_id int64, success func(), failure func(record int64))
func (*PGXBaseRepo[C, U, G]) GetOne ¶
func (b *PGXBaseRepo[C, U, G]) GetOne(entity_id int64, success func(data G), failure func(record int64), sub_queries ...SubQuery)
func (*PGXBaseRepo[C, U, G]) Update ¶
func (b *PGXBaseRepo[C, U, G]) Update(entity_id int64, dat U, success func(), failure func(record int64))
type PQBaseRepo ¶
type PQBaseRepo[C, U, G any] struct { PrimaryKey string `json:"primary_key"` Schema string `json:"schema"` Table string `json:"table"` // contains filtered or unexported fields }
func (*PQBaseRepo[C, U, G]) ChangeStatus ¶
func (b *PQBaseRepo[C, U, G]) ChangeStatus(entity_id, status int64, success func(), failure func(record int64))
func (*PQBaseRepo[C, U, G]) Create ¶
func (b *PQBaseRepo[C, U, G]) Create(dat C, success func(id int64), failure func(record int64))
func (*PQBaseRepo[C, U, G]) DeleteOne ¶
func (b *PQBaseRepo[C, U, G]) DeleteOne(entity_id int64, success func(), failure func(record int64))
func (*PQBaseRepo[C, U, G]) GetOne ¶
func (b *PQBaseRepo[C, U, G]) GetOne(entity_id int64, success func(data G), failure func(record int64), sub_queries ...SubQuery)
func (*PQBaseRepo[C, U, G]) Update ¶
func (b *PQBaseRepo[C, U, G]) Update(entity_id int64, dat U, success func(), failure func(record int64))
type SQLXBaseRepo ¶
type SQLXBaseRepo[C, U, G any] struct { PrimaryKey string `json:"primary_key"` Schema string `json:"schema"` Table string `json:"table"` // contains filtered or unexported fields }
func (*SQLXBaseRepo[C, U, G]) ChangeStatus ¶
func (b *SQLXBaseRepo[C, U, G]) ChangeStatus(entity_id, status int64, success func(), failure func(record int64))
func (*SQLXBaseRepo[C, U, G]) Create ¶
func (b *SQLXBaseRepo[C, U, G]) Create(dat C, success func(id int64), failure func(record int64))
func (*SQLXBaseRepo[C, U, G]) DeleteOne ¶
func (b *SQLXBaseRepo[C, U, G]) DeleteOne(entity_id int64, success func(), failure func(record int64))
func (*SQLXBaseRepo[C, U, G]) GetOne ¶
func (b *SQLXBaseRepo[C, U, G]) GetOne(entity_id int64, success func(data G), failure func(record int64), sub_queries ...SubQuery)
func (*SQLXBaseRepo[C, U, G]) Update ¶
func (b *SQLXBaseRepo[C, U, G]) Update(entity_id int64, dat U, success func(), failure func(record int64))
Click to show internal directories.
Click to hide internal directories.