Documentation
¶
Index ¶
- type Default
- func (d *Default) Delete(id interface{}) error
- func (d *Default) DeleteAll(pred interface{}) error
- func (d *Default) Find(id interface{}, value interface{}) error
- func (d *Default) FindBy(key string, value interface{}, results interface{}) error
- func (d *Default) FindByAndCount(key string, value interface{}) (int, error)
- func (d *Default) FindOneBy(key string, value interface{}, result interface{}) error
- func (d *Default) GetDBName() string
- func (d *Default) GetSession() interface{}
- func (d *Default) GetTable() interface{}
- func (d *Default) GetTableName() string
- func (d *Default) Insert(data interface{}) error
- func (d *Default) InsertOrUpdate(id interface{}, data interface{}) error
- func (d *Default) List(results interface{}, sortParams *api.SortParameters, ...) error
- func (d *Default) Search(results interface{}, filter map[string]interface{}, ...) error
- func (d *Default) Update(selector interface{}, data interface{}) error
- func (d *Default) UpdateID(id interface{}, data interface{}) error
- func (d *Default) Where(filter map[string]interface{}, results interface{}) error
- func (d *Default) WhereAndFetchLimit(filter map[string]interface{}, paginator *api.Pagination, results interface{}) error
- func (d *Default) WhereAndFetchOne(filter map[string]interface{}, result interface{}) error
- func (d *Default) WhereCount(filter map[string]interface{}) (int, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Default ¶
type Default struct {
// contains filtered or unexported fields
}
Default contains the basic implementation of the EntityCRUD interface
func NewCRUDTable ¶
NewCRUDTable sets up a new Default struct
func (*Default) FindByAndCount ¶
FindByAndCount is used to count object that matchs the (key = value) predicate
func (*Default) GetSession ¶
func (d *Default) GetSession() interface{}
GetSession returns the current session
func (*Default) GetTableName ¶
GetTableName returns table's name
func (*Default) InsertOrUpdate ¶
InsertOrUpdate a document occording to ID presence in database
func (*Default) List ¶
func (d *Default) List(results interface{}, sortParams *api.SortParameters, pagination *api.Pagination) error
List all entities from the database
func (*Default) Search ¶
func (d *Default) Search(results interface{}, filter map[string]interface{}, sortParams *api.SortParameters, pagination *api.Pagination) error
Search all entities from the database
func (*Default) WhereAndFetchLimit ¶
func (d *Default) WhereAndFetchLimit(filter map[string]interface{}, paginator *api.Pagination, results interface{}) error
WhereAndFetchLimit returns paginated list of document
func (*Default) WhereAndFetchOne ¶
WhereAndFetchOne returns one document that match the filter
Click to show internal directories.
Click to hide internal directories.