Documentation ¶
Index ¶
- type MockSqlDatabase
- func (mdb *MockSqlDatabase) BeginTransaction() (*sql.Tx, error)
- func (mdb *MockSqlDatabase) DbClose()
- func (mdb *MockSqlDatabase) DbInit(_, _ string, _ int)
- func (mdb *MockSqlDatabase) RunQuery(query string, args ...interface{}) (*sql.Rows, error)
- func (mdb *MockSqlDatabase) RunTransaction(queries []Query) error
- type PostgresImpl
- func (postgres *PostgresImpl) BeginTransaction() (*sql.Tx, error)
- func (postgres *PostgresImpl) DbClose()
- func (postgres *PostgresImpl) DbInit(driver string, connectorString string, maxRetries int)
- func (postgres *PostgresImpl) RunQuery(query string, args ...interface{}) (*sql.Rows, error)
- func (postgres *PostgresImpl) RunTransaction(queries []Query) error
- type Query
- type SqlDatabase
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MockSqlDatabase ¶
func (*MockSqlDatabase) BeginTransaction ¶ added in v1.0.3
func (mdb *MockSqlDatabase) BeginTransaction() (*sql.Tx, error)
func (*MockSqlDatabase) DbClose ¶
func (mdb *MockSqlDatabase) DbClose()
func (*MockSqlDatabase) DbInit ¶
func (mdb *MockSqlDatabase) DbInit(_, _ string, _ int)
func (*MockSqlDatabase) RunQuery ¶
func (mdb *MockSqlDatabase) RunQuery(query string, args ...interface{}) (*sql.Rows, error)
func (*MockSqlDatabase) RunTransaction ¶ added in v1.0.2
func (mdb *MockSqlDatabase) RunTransaction(queries []Query) error
type PostgresImpl ¶
type PostgresImpl struct {
// contains filtered or unexported fields
}
func (*PostgresImpl) BeginTransaction ¶ added in v1.0.3
func (postgres *PostgresImpl) BeginTransaction() (*sql.Tx, error)
func (*PostgresImpl) DbClose ¶
func (postgres *PostgresImpl) DbClose()
func (*PostgresImpl) DbInit ¶
func (postgres *PostgresImpl) DbInit(driver string, connectorString string, maxRetries int)
func (*PostgresImpl) RunQuery ¶
func (postgres *PostgresImpl) RunQuery(query string, args ...interface{}) (*sql.Rows, error)
func (*PostgresImpl) RunTransaction ¶ added in v1.0.2
func (postgres *PostgresImpl) RunTransaction(queries []Query) error
type SqlDatabase ¶
type SqlDatabase interface { // DbInit Performs initialization operation for the database. DbInit(driver, connectorString string, maxRetries int) // DbClose Performs cleanup operation for the database. DbClose() // RunQuery Runs thr QueryString to the database RunQuery(query string, args ...interface{}) (*sql.Rows, error) // RunTransaction Runs all the queries as a transaction RunTransaction(queries []Query) error BeginTransaction() (*sql.Tx, error) }
Click to show internal directories.
Click to hide internal directories.