Documentation ¶
Index ¶
- type InterfaceRead
- type InterfaceWrite
- type MockRead
- func (m *MockRead) Connect() *response.Response
- func (m *MockRead) Find(entity interface{}, query *gorm.DB, tableName string) *response.Response
- func (m *MockRead) First(out interface{}, where ...interface{}) *response.Response
- func (m *MockRead) GetConnection() *gorm.DB
- func (m *MockRead) IsAvailable() bool
- func (m *MockRead) RawSQL(sql string, entity interface{}) *response.Response
- func (m *MockRead) Related(model, related interface{}, filter map[string]interface{}, ...) *response.Response
- func (m *MockRead) SetFilter(filter map[string]interface{}) *gorm.DB
- func (m *MockRead) SetLogMode(logMode bool)
- type MockWrite
- func (m *MockWrite) CommitTransaction() *response.Response
- func (m *MockWrite) Connect() *response.Response
- func (m *MockWrite) Create(entity interface{}, tableName string) *response.Response
- func (m *MockWrite) CreateOrUpdate(entity interface{}, conditions map[string]interface{}, tableName string) *response.Response
- func (m *MockWrite) Delete(conditions map[string]interface{}, tableName string) *response.Response
- func (m *MockWrite) DeleteByQuery(query *gorm.DB, tableName string) *response.Response
- func (m *MockWrite) GetConnection() *gorm.DB
- func (m *MockWrite) IsAvailable() bool
- func (m *MockWrite) RollbackTransaction() *response.Response
- func (m *MockWrite) SetLogMode(logMode bool)
- func (m *MockWrite) StartTransaction() InterfaceWrite
- func (m *MockWrite) Update(entity interface{}, conditions map[string]interface{}, tableName string) *response.Response
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type InterfaceRead ¶
type InterfaceRead interface { Connect() *response.Response GetConnection() *gorm.DB IsAvailable() bool SetLogMode(logMode bool) Find(entity interface{}, query *gorm.DB, tableName string) *response.Response SetFilter(filter map[string]interface{}) *gorm.DB First(out interface{}, where ...interface{}) *response.Response Related(model, related interface{}, filter map[string]interface{}, foreignKeys ...string) *response.Response RawSQL(sql string, entity interface{}) *response.Response }
type InterfaceWrite ¶
type InterfaceWrite interface { Connect() *response.Response GetConnection() *gorm.DB IsAvailable() bool SetLogMode(logMode bool) Create(entity interface{}, tableName string) *response.Response CreateOrUpdate(entity interface{}, conditions map[string]interface{}, tableName string) *response.Response Update(entity interface{}, conditions map[string]interface{}, tableName string) *response.Response Delete(conditions map[string]interface{}, tableName string) *response.Response DeleteByQuery(condition *gorm.DB, tableName string) *response.Response StartTransaction() InterfaceWrite RollbackTransaction() *response.Response CommitTransaction() *response.Response }
type MockRead ¶
func (*MockRead) GetConnection ¶
func (*MockRead) IsAvailable ¶
func (*MockRead) SetLogMode ¶
type MockWrite ¶
func (*MockWrite) CommitTransaction ¶
func (*MockWrite) CreateOrUpdate ¶
func (*MockWrite) DeleteByQuery ¶
func (*MockWrite) GetConnection ¶
func (*MockWrite) IsAvailable ¶
func (*MockWrite) RollbackTransaction ¶
func (*MockWrite) SetLogMode ¶
func (*MockWrite) StartTransaction ¶
func (m *MockWrite) StartTransaction() InterfaceWrite
Source Files ¶
Click to show internal directories.
Click to hide internal directories.