Documentation
¶
Index ¶
- type MyDB
- func (m *MyDB) BeginTransaction() di.Transaction
- func (m *MyDB) Close() bool
- func (m *MyDB) Connect() bool
- func (m *MyDB) Delete(query string, args ...interface{}) bool
- func (m *MyDB) Get(query string, args ...interface{}) *di.DbRow
- func (m *MyDB) GetList(query string, args ...interface{}) *di.DbRows
- func (m *MyDB) GetNewDatabase() di.Database
- func (m *MyDB) Insert(query string, args ...interface{}) (bool, int64)
- func (m *MyDB) Test(query string, args ...interface{}) *di.DbRow
- func (m *MyDB) Update(query string, args ...interface{}) bool
- type MyDBMock
- func (m *MyDBMock) BeginTransaction() di.Transaction
- func (m *MyDBMock) Close() bool
- func (m *MyDBMock) Connect() bool
- func (m *MyDBMock) Delete(query string, args ...interface{}) bool
- func (m *MyDBMock) Get(query string, args ...interface{}) *di.DbRow
- func (m *MyDBMock) GetList(query string, args ...interface{}) *di.DbRows
- func (m *MyDBMock) GetNewDatabase() di.Database
- func (m *MyDBMock) Insert(query string, args ...interface{}) (bool, int64)
- func (m *MyDBMock) Test(query string, args ...interface{}) *di.DbRow
- func (m *MyDBMock) Update(query string, args ...interface{}) bool
- type MyDbTx
- type MyDbTxMock
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MyDB ¶
type MyDB struct { Host string User string Port string Password string Database string // contains filtered or unexported fields }
MyDB MyDB
func (*MyDB) BeginTransaction ¶
func (m *MyDB) BeginTransaction() di.Transaction
BeginTransaction BeginTransaction
func (*MyDB) GetNewDatabase ¶
GetNewDatabase GetNewDatabase
type MyDBMock ¶
type MyDBMock struct { Host string User string Password string Database string MockConnectSuccess bool MockCloseSuccess bool MockCommitSuccess bool MockRollbackSuccess bool MockInsertSuccess1 bool MockInsertSuccess2 bool MockInsertSuccess3 bool MockInsertSuccess4 bool MockInsertSuccess5 bool MockInsertSuccess6 bool MockInsertSuccess7 bool MockInsertSuccess8 bool MockInsertID1 int64 MockInsertID2 int64 MockInsertID3 int64 MockInsertID4 int64 MockInsertID5 int64 MockInsertID6 int64 MockInsertID7 int64 MockInsertID8 int64 MockUpdateSuccess1 bool MockUpdateSuccess2 bool MockUpdateSuccess3 bool MockUpdateSuccess4 bool MockDeleteSuccess1 bool MockDeleteSuccess2 bool MockDeleteSuccess3 bool MockDeleteSuccess4 bool MockDeleteSuccess5 bool MockDeleteSuccess6 bool MockDeleteSuccess7 bool MockDeleteSuccess8 bool MockTestRow *di.DbRow MockRow1 *di.DbRow MockRow2 *di.DbRow MockRow3 *di.DbRow MockRow4 *di.DbRow MockRow5 *di.DbRow MockRow6 *di.DbRow MockRow7 *di.DbRow MockRow8 *di.DbRow MockRows1 *di.DbRows MockRows2 *di.DbRows MockRows3 *di.DbRows MockRows4 *di.DbRows MockRows5 *di.DbRows MockRows6 *di.DbRows MockRows7 *di.DbRows MockRows8 *di.DbRows // contains filtered or unexported fields }
MyDBMock MyDBMock
func (*MyDBMock) BeginTransaction ¶
func (m *MyDBMock) BeginTransaction() di.Transaction
BeginTransaction BeginTransaction
func (*MyDBMock) GetNewDatabase ¶
GetNewDatabase GetNewDatabase
type MyDbTx ¶
MyDbTx MyDbTx
type MyDbTxMock ¶
MyDbTxMock MyDbTxMock
func (*MyDbTxMock) Delete ¶
func (t *MyDbTxMock) Delete(query string, args ...interface{}) bool
Delete Delete
func (*MyDbTxMock) Insert ¶
func (t *MyDbTxMock) Insert(query string, args ...interface{}) (bool, int64)
Insert Insert
func (*MyDbTxMock) Update ¶
func (t *MyDbTxMock) Update(query string, args ...interface{}) bool
Update Update
Click to show internal directories.
Click to hide internal directories.