Documentation
¶
Index ¶
- type Database
- func (m *Database[T]) Add(db database.Database[T], act ErrAction)
- func (m *Database[T]) Close() error
- func (m *Database[T]) Create(tableName string, config map[string]database.Config) error
- func (m *Database[T]) DeleteTable(tableName string) error
- func (m *Database[T]) GetTable(tableName string, example T) (database.Table[T], error)
- type ErrAction
- type Table
- func (t *Table[T]) Del(val T, whereFields []string, ttl time.Duration) error
- func (t *Table[T]) Get(val T, whereFields []string, opts database.Options, ttl time.Duration) ([]T, error)
- func (t *Table[T]) Ins(val T, ttl time.Duration) error
- func (t *Table[T]) Set(old, updated T, whereFields, setFields []string, ttl time.Duration) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Database ¶
type Database[T any] struct { // contains filtered or unexported fields }
func (*Database[T]) Close ¶
Close closes every underlying database and reports every failure, so one broken backend does not hide the others.
func (*Database[T]) DeleteTable ¶
Click to show internal directories.
Click to hide internal directories.