Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrInvalidDatabaseURL means invalid as a SQLAlchemy's Engine URL format. ErrInvalidDatabaseURL = errors.New("invalid database url") // ErrUnsupportedDialect means the given dialect is unsupported. ErrUnsupportedDialect = errors.New("unsupported dialect") )
Functions ¶
func GetGormDBFromURL ¶
func GetGormDBFromURL(url string, opt *EngineOption) (*gorm.DB, error)
GetGormDBFromURL parse SQLAlchemy's Engine URL format and returns GORM v2 DB object.
func ParseDatabaseURL ¶
func ParseDatabaseURL(url string, opt *EngineOption) (string, string, error)
ParseDatabaseURL parse SQLAlchemy's Engine URL format and returns Go's dialect and args.
Types ¶
Click to show internal directories.
Click to hide internal directories.