Documentation ¶
Index ¶
- Constants
- func GetDriverNameForSqlDb(db *sql.DB) (string, error)
- func NewStorage(db *sql.DB) (storage.Storage, error)
- func NewStorageByConnectionManager(ctx context.Context, connectionManager storage.ConnectionManager[*sql.DB]) (sqlDbStorage storage.Storage, returnError error)
- func NewStorageByDriverName(driverName string, connectionManager storage.ConnectionManager[*sql.DB]) (storage.Storage, error)
Constants ¶
View Source
const ( DriverNameMysql = "mysql" DriverNamePostgresql = "postgres" DriverNameSqlServer = "sqlserver" DriverNameSqlite3 = "sqlite3" )
TODO 2023-8-6 23:09:42 扩展更多支持的驱动
Variables ¶
This section is empty.
Functions ¶
func GetDriverNameForSqlDb ¶
GetDriverNameForSqlDb 根据sql.Driver的不同实现来识别驱动的名称
func NewStorage ¶
NewStorage 根据sql.DB创建对应的Storage
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.