Versions in this module Expand all Collapse all v1 v1.0.2 Jul 13, 2023 Changes in this version + type PgDB struct + Database string + Host string + Password string + Port string + User string + func (m *PgDB) BeginTransaction() di.Transaction + func (m *PgDB) Close() bool + func (m *PgDB) Connect() bool + func (m *PgDB) Delete(query string, args ...interface{}) bool + func (m *PgDB) Get(query string, args ...interface{}) *di.DbRow + func (m *PgDB) GetList(query string, args ...interface{}) *di.DbRows + func (m *PgDB) GetNewDatabase() di.Database + func (m *PgDB) Insert(query string, args ...interface{}) (bool, int64) + func (m *PgDB) Test(query string, args ...interface{}) *di.DbRow + func (m *PgDB) Update(query string, args ...interface{}) bool + type PgDBMock struct + Database string + Host string + MockCloseSuccess bool + MockCommitSuccess bool + MockConnectSuccess bool + MockDeleteSuccess1 bool + MockDeleteSuccess2 bool + MockDeleteSuccess3 bool + MockDeleteSuccess4 bool + MockDeleteSuccess5 bool + MockDeleteSuccess6 bool + MockDeleteSuccess7 bool + MockDeleteSuccess8 bool + MockInsertID1 int64 + MockInsertID2 int64 + MockInsertID3 int64 + MockInsertID4 int64 + MockInsertID5 int64 + MockInsertID6 int64 + MockInsertID7 int64 + MockInsertID8 int64 + MockInsertSuccess1 bool + MockInsertSuccess2 bool + MockInsertSuccess3 bool + MockInsertSuccess4 bool + MockInsertSuccess5 bool + MockInsertSuccess6 bool + MockInsertSuccess7 bool + MockInsertSuccess8 bool + MockRollbackSuccess bool + 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 + MockTestRow *di.DbRow + MockUpdateSuccess1 bool + MockUpdateSuccess2 bool + MockUpdateSuccess3 bool + MockUpdateSuccess4 bool + Password string + User string + func (m *PgDBMock) BeginTransaction() di.Transaction + func (m *PgDBMock) Close() bool + func (m *PgDBMock) Connect() bool + func (m *PgDBMock) Delete(query string, args ...interface{}) bool + func (m *PgDBMock) Get(query string, args ...interface{}) *di.DbRow + func (m *PgDBMock) GetList(query string, args ...interface{}) *di.DbRows + func (m *PgDBMock) GetNewDatabase() di.Database + func (m *PgDBMock) Insert(query string, args ...interface{}) (bool, int64) + func (m *PgDBMock) Test(query string, args ...interface{}) *di.DbRow + func (m *PgDBMock) Update(query string, args ...interface{}) bool + type PgDbTx struct + Tx *sql.Tx + func (t *PgDbTx) Commit() bool + func (t *PgDbTx) Delete(query string, args ...interface{}) bool + func (t *PgDbTx) Insert(query string, args ...interface{}) (bool, int64) + func (t *PgDbTx) Rollback() bool + func (t *PgDbTx) Update(query string, args ...interface{}) bool + type PgDbTxMock struct + PgDBMock *PgDBMock + Tx *sql.Tx + func (t *PgDbTxMock) Commit() bool + func (t *PgDbTxMock) Delete(query string, args ...interface{}) bool + func (t *PgDbTxMock) Insert(query string, args ...interface{}) (bool, int64) + func (t *PgDbTxMock) Rollback() bool + func (t *PgDbTxMock) Update(query string, args ...interface{}) bool v1.0.1 Jul 13, 2023 Changes in this version + type MyDB struct + Database string + Host string + Password string + Port string + User string + 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 struct + Database string + Host string + MockCloseSuccess bool + MockCommitSuccess bool + MockConnectSuccess bool + MockDeleteSuccess1 bool + MockDeleteSuccess2 bool + MockDeleteSuccess3 bool + MockDeleteSuccess4 bool + MockDeleteSuccess5 bool + MockDeleteSuccess6 bool + MockDeleteSuccess7 bool + MockDeleteSuccess8 bool + MockInsertID1 int64 + MockInsertID2 int64 + MockInsertID3 int64 + MockInsertID4 int64 + MockInsertID5 int64 + MockInsertID6 int64 + MockInsertID7 int64 + MockInsertID8 int64 + MockInsertSuccess1 bool + MockInsertSuccess2 bool + MockInsertSuccess3 bool + MockInsertSuccess4 bool + MockInsertSuccess5 bool + MockInsertSuccess6 bool + MockInsertSuccess7 bool + MockInsertSuccess8 bool + MockRollbackSuccess bool + 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 + MockTestRow *di.DbRow + MockUpdateSuccess1 bool + MockUpdateSuccess2 bool + MockUpdateSuccess3 bool + MockUpdateSuccess4 bool + Password string + User string + 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 struct + Tx *sql.Tx + func (t *MyDbTx) Commit() bool + func (t *MyDbTx) Delete(query string, args ...interface{}) bool + func (t *MyDbTx) Insert(query string, args ...interface{}) (bool, int64) + func (t *MyDbTx) Rollback() bool + func (t *MyDbTx) Update(query string, args ...interface{}) bool + type MyDbTxMock struct + MyDBMock *MyDBMock + Tx *sql.Tx + func (t *MyDbTxMock) Commit() bool + func (t *MyDbTxMock) Delete(query string, args ...interface{}) bool + func (t *MyDbTxMock) Insert(query string, args ...interface{}) (bool, int64) + func (t *MyDbTxMock) Rollback() bool + func (t *MyDbTxMock) Update(query string, args ...interface{}) bool