Documentation ¶
Index ¶
- Variables
- func Drivers() []string
- type GlobModifier
- type RegexpModifier
- type Storage
- func (s *Storage) AddForeignKey(v interface{}, field, dest, onDelete, onUpdate string) *Storage
- func (s *Storage) Association(v interface{}, fields ...string) *Storage
- func (s *Storage) Close() error
- func (s *Storage) Count(v interface{}) (int, error)
- func (s *Storage) DB() *gorm.DB
- func (s *Storage) Delete(v interface{}) error
- func (s *Storage) Get(column string, values interface{}, v interface{}, assoc bool) error
- func (s *Storage) List(v interface{}, filters map[string]interface{}, sort []string, ...) (int, error)
- func (s *Storage) Migrate(v ...interface{}) error
- func (s *Storage) Save(v interface{}) error
- func (s *Storage) Search(values []interface{}, v interface{}, filters map[string]interface{}, ...) (int, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrItemConflict represents an item conflict error. ErrItemConflict = errors.New("item conflict") // ErrItemNotFound represents an item not found error. ErrItemNotFound = errors.New("item not found") // ErrMissingField represents a missing mandatory field error. ErrMissingField = errors.New("missing mandatory field") // ErrUnknownColumn represents an unknown column error. ErrUnknownColumn = errors.New("unknown column") // ErrUnknownReference represents an unknown reference error. ErrUnknownReference = errors.New("unknown reference") // ErrUnsupportedDriver represents an unsupported database driver error. ErrUnsupportedDriver = errors.New("unsupported driver") )
Functions ¶
Types ¶
type GlobModifier ¶
type GlobModifier string
GlobModifier represents a glob pattern string modifier.
type RegexpModifier ¶
type RegexpModifier string
RegexpModifier represents a regexp pattern string modifier.
type Storage ¶
type Storage struct {
// contains filtered or unexported fields
}
Storage represents a storage instance.
func NewStorage ¶
NewStorage creates a new storage instance.
func (*Storage) AddForeignKey ¶
AddForeignKey defines a new foreign key for a given item.
func (*Storage) Association ¶
Association registers a new item association field.
func (*Storage) List ¶
func (s *Storage) List(v interface{}, filters map[string]interface{}, sort []string, offset, limit int, assoc bool) (int, error)
List retrieves a list of existing items from the storage.
Click to show internal directories.
Click to hide internal directories.