Documentation ¶
Index ¶
- type Service
- func (service *Service) Array(model interface{}, expr string, retval interface{}, condition string, ...)
- func (service *Service) CheckTable(entity interface{}) error
- func (service *Service) ColumnsWhere(model interface{}, columns []string, condition string, params ...interface{}) error
- func (service *Service) Configure()
- func (service *Service) Count(model interface{}, condition string, params ...interface{}) int
- func (service *Service) CountExpr(model interface{}, expr string, retval interface{}, condition string, ...)
- func (service *Service) Delete(query interface{}) error
- func (service *Service) Find(query interface{}, callback func(query interface{}))
- func (service *Service) FindAll(query interface{}) error
- func (service *Service) Insert(query ...interface{}) error
- func (service *Service) Raw(query interface{}, params ...interface{}) error
- func (service *Service) Save(query ...interface{}) error
- func (service *Service) Select(query interface{}) error
- func (service *Service) Update(query interface{}) error
- func (service *Service) Where(model interface{}, condition string, params ...interface{}) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Service ¶
type Service struct { Log api.LogService Env api.Settings // contains filtered or unexported fields }
Service to help abstract the technical implementation per driver used.
func (*Service) Array ¶
func (service *Service) Array(model interface{}, expr string, retval interface{}, condition string, params ...interface{})
Array fills an array from the model and expression.
func (*Service) CheckTable ¶
CheckTable ensures a the table exists for the persistor.
func (*Service) ColumnsWhere ¶
func (service *Service) ColumnsWhere(model interface{}, columns []string, condition string, params ...interface{}) error
ColumnsWhere is a conditional selection based on the model in the data store only returning specific quoted columns.
func (*Service) Configure ¶
func (service *Service) Configure()
Configure establishes a new database connection
func (*Service) CountExpr ¶
func (service *Service) CountExpr(model interface{}, expr string, retval interface{}, condition string, params ...interface{})
CountExpr return the number of rows found with an expression.
func (*Service) Find ¶
func (service *Service) Find(query interface{}, callback func(query interface{}))
Find will check if the model exists and run the additional functionality.
Click to show internal directories.
Click to hide internal directories.