Documentation
¶
Index ¶
- func NewDSN(opts conf.DatabaseOpts) (dsn string, err error)
- func OpenDB(opts conf.DatabaseOpts, cfg *gorm.Config) (*gorm.DB, error)
- func ParseMSSQLHostPort(info string) (host, port string)
- func ParsePostgreSQLHostPort(info string) (host, port string)
- func Quote(format string, args ...string) string
- type Logger
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewDSN ¶ added in v0.13.0
func NewDSN(opts conf.DatabaseOpts) (dsn string, err error)
NewDSN takes given database options and returns parsed DSN.
func OpenDB ¶ added in v0.13.0
OpenDB opens a new database connection encapsulated as gorm.DB using given database options and GORM config.
func ParseMSSQLHostPort ¶ added in v0.13.0
ParseMSSQLHostPort parses given input in various forms for MSSQL and returns proper host and port number.
func ParsePostgreSQLHostPort ¶ added in v0.13.0
ParsePostgreSQLHostPort parses given input in various forms defined in https://www.postgresql.org/docs/current/static/libpq-connect.html#LIBPQ-CONNSTRING and returns proper host and port number.
Types ¶
Click to show internal directories.
Click to hide internal directories.