Documentation ¶
Index ¶
- type BasicMapper
- func (d *BasicMapper[T]) Delete(t *T) (int64, error)
- func (d *BasicMapper[T]) Insert(t *T) (int64, error)
- func (d *BasicMapper[T]) Select(where *T) ([]*T, error)
- func (d *BasicMapper[T]) SelectBySQL(sql string, args ...interface{}) ([]*T, error)
- func (d *BasicMapper[T]) SelectWithPage(where *T, p *Pagenation) ([]*T, error)
- func (d *BasicMapper[T]) Update(old *T, new *T) (int64, error)
- type Config
- type DatabaseSource
- type Pagenation
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BasicMapper ¶
type BasicMapper[T schema.Tabler] struct { *DatabaseSource }
func NewBasicMapper ¶
func NewBasicMapper[T schema.Tabler](ds *DatabaseSource) (*BasicMapper[T], error)
func (*BasicMapper[T]) Delete ¶
func (d *BasicMapper[T]) Delete(t *T) (int64, error)
func (*BasicMapper[T]) Insert ¶
func (d *BasicMapper[T]) Insert(t *T) (int64, error)
func (*BasicMapper[T]) Select ¶
func (d *BasicMapper[T]) Select(where *T) ([]*T, error)
func (*BasicMapper[T]) SelectBySQL ¶
func (d *BasicMapper[T]) SelectBySQL(sql string, args ...interface{}) ([]*T, error)
func (*BasicMapper[T]) SelectWithPage ¶
func (d *BasicMapper[T]) SelectWithPage(where *T, p *Pagenation) ([]*T, error)
func (*BasicMapper[T]) Update ¶
func (d *BasicMapper[T]) Update(old *T, new *T) (int64, error)
type DatabaseSource ¶
func NewDatabaseSource ¶
func NewDatabaseSource(conf *Config) (*DatabaseSource, error)
Click to show internal directories.
Click to hide internal directories.