Documentation ¶
Index ¶
- Constants
- Variables
- func DbManagerNameExist(err error) bool
- func DbManagerNameNotFound(err error) bool
- func DbManagerNameOpen(err error) bool
- type DbInfo
- type DbManager
- func (m *DbManager) Add(dbInfo *DbInfo) error
- func (m *DbManager) Exist(name string) bool
- func (m *DbManager) Get(name string) (*DbInfo, error)
- func (m *DbManager) Open(name, driverName, dataSourceName string) error
- func (m *DbManager) OpenDB(name, driverName string, db *sql.DB) error
- func (m *DbManager) Remove(name string) (*DbInfo, error)
Constants ¶
View Source
const ( MySQL = "mysql" SQLite = "sqlite3" Postgres = "postgres" SQLServer = "mssql" )
Variables ¶
View Source
var DefaultDbManger = NewDbManager()
Functions ¶
func DbManagerNameExist ¶
func DbManagerNameNotFound ¶
func DbManagerNameOpen ¶
Types ¶
type DbManager ¶
type DbManager struct {
// contains filtered or unexported fields
}
func NewDbManager ¶
func NewDbManager() *DbManager
Click to show internal directories.
Click to hide internal directories.