Documentation ¶
Index ¶
- type Connection
- type IDatabaseRead
- type IDatabaseWrite
- type Mock
- func (m *Mock) CommitTransaction() response.IResponse
- func (m *Mock) Create(_ interface{}, _ string) response.IResponse
- func (m *Mock) CreateOrUpdate(_ interface{}, _ map[string]interface{}, _ string) response.IResponse
- func (m *Mock) Delete(_ map[string]interface{}, _ string) response.IResponse
- func (m *Mock) Find(entityPointer interface{}, _ map[string]interface{}, _ string) response.IResponse
- func (m *Mock) FindPreload(entityPointer interface{}, _ map[string]interface{}, ...) response.IResponse
- func (m *Mock) FindPreloadWitLimitAndPage(entityPointer interface{}, _ map[string]interface{}, ...) response.IResponse
- func (m *Mock) First(entityPointer interface{}, _ map[string]interface{}, _ string) response.IResponse
- func (m *Mock) IsAvailable() bool
- func (m *Mock) Raw(_ string, entityPointer interface{}, _ ...interface{}) response.IResponse
- func (m *Mock) RollbackTransaction() response.IResponse
- func (m *Mock) StartTransaction() IDatabaseWrite
- func (m *Mock) Update(_ interface{}, _ map[string]interface{}, _ string) response.IResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Connection ¶
type Connection struct { Read IDatabaseRead Write IDatabaseWrite }
func NewDatabaseReadAndWrite ¶
func NewDatabaseReadAndWrite(config databaseConfig.IConfig) (*Connection, error)
type IDatabaseRead ¶
type IDatabaseRead interface { IsAvailable() bool FindPreload(entityPointer interface{}, where map[string]interface{}, preloads map[string][]interface{}, table string) response.IResponse Find(entityPointer interface{}, where map[string]interface{}, table string) response.IResponse First(entityPointer interface{}, where map[string]interface{}, table string) response.IResponse Raw(rawSQL string, entityPointer interface{}, values ...interface{}) response.IResponse FindPreloadWitLimitAndPage(entityPointer interface{}, where map[string]interface{}, preloads map[string][]interface{}, table string, limit, page int) response.IResponse }
type IDatabaseWrite ¶
type IDatabaseWrite interface { StartTransaction() IDatabaseWrite RollbackTransaction() response.IResponse CommitTransaction() response.IResponse IsAvailable() bool Create(entityPointer interface{}, table string) response.IResponse CreateOrUpdate(entityPointer interface{}, where map[string]interface{}, table string) response.IResponse Update(entityPointer interface{}, where map[string]interface{}, table string) response.IResponse Delete(where map[string]interface{}, table string) response.IResponse }
type Mock ¶
func (*Mock) CommitTransaction ¶
func (*Mock) CreateOrUpdate ¶
func (*Mock) FindPreload ¶
func (*Mock) FindPreloadWitLimitAndPage ¶ added in v1.0.13
func (*Mock) IsAvailable ¶
func (*Mock) RollbackTransaction ¶
func (*Mock) StartTransaction ¶
func (m *Mock) StartTransaction() IDatabaseWrite
Source Files ¶
Click to show internal directories.
Click to hide internal directories.