sqlx

package
v0.1.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 23, 2021 License: MIT Imports: 4 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DefaultDB

func DefaultDB(driverName, dataSourceName string) (*xorm.Engine, error)

func InitMysql

func InitMysql(conf *MysqlConf) (*xorm.Engine, error)

func InitSqlite added in v0.0.6

func InitSqlite(conf *SqliteConf) (*xorm.Engine, error)

Types

type MysqlConf

type MysqlConf struct {
	Host     string `json:"host"`
	Port     string `json:"port"`
	Database string `json:"database"`
	Username string `json:"username"`
	Password string `json:"password"`
	ShowSQL  bool   `json:"showsql"`
}

type SqliteConf added in v0.0.6

type SqliteConf struct {
	Database string `json:"database"`
	ShowSQL  bool   `json:"showsql"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL