Documentation ¶
Index ¶
- func NewGenericRepository(db *sqlx.DB) generic.GenericRepository
- type GenericRepository
- func (r *GenericRepository) BulkUpsert(ctx context.Context, object []interface{}) ([]interface{}, error)
- func (r *GenericRepository) Delete(ctx context.Context, object interface{}) error
- func (r *GenericRepository) FindAll(ctx context.Context, params []interface{}) ([]interface{}, error)
- func (r *GenericRepository) FindOne(ctx context.Context, id interface{}) (interface{}, error)
- func (r *GenericRepository) Insert(ctx context.Context, object interface{}) (interface{}, error)
- func (r *GenericRepository) Update(ctx context.Context, object interface{}) (interface{}, error)
- func (r *GenericRepository) Upsert(ctx context.Context, object interface{}) (interface{}, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewGenericRepository ¶
func NewGenericRepository(db *sqlx.DB) generic.GenericRepository
Types ¶
type GenericRepository ¶
type GenericRepository struct {
// contains filtered or unexported fields
}
func (*GenericRepository) BulkUpsert ¶
func (r *GenericRepository) BulkUpsert(ctx context.Context, object []interface{}) ([]interface{}, error)
func (*GenericRepository) Delete ¶
func (r *GenericRepository) Delete(ctx context.Context, object interface{}) error
func (*GenericRepository) FindAll ¶
func (r *GenericRepository) FindAll(ctx context.Context, params []interface{}) ([]interface{}, error)
func (*GenericRepository) FindOne ¶
func (r *GenericRepository) FindOne(ctx context.Context, id interface{}) (interface{}, error)
func (*GenericRepository) Insert ¶
func (r *GenericRepository) Insert(ctx context.Context, object interface{}) (interface{}, error)
Click to show internal directories.
Click to hide internal directories.