Documentation
¶
Index ¶
Constants ¶
View Source
const MSSQL_DEFAULT_PORT uint16 = 1433
View Source
const MYSQL_DEFAULT_PORT uint16 = 3306
View Source
const ORACLE_DEFAULT_PORT uint16 = 1521
View Source
const PGSQL_DEFAULT_PORT uint16 = 5432
View Source
const REDIS_DEFAULT_PORT uint16 = 6379
Variables ¶
View Source
var ( ConcatWith = utils.ConcatWith WrapWith = utils.WrapWith )
Functions ¶
This section is empty.
Types ¶
type ConnParams ¶
type ConnParams struct {
Host string
Port int
Username string
Password string
Database string
Options map[string]interface{}
}
连接配置
func (ConnParams) GetAddr ¶
func (p ConnParams) GetAddr(defaultHost string, defaultPort uint16) string
func (ConnParams) StrPort ¶
func (p ConnParams) StrPort(defaultPort uint16) string
type Dialect ¶
type Dialect interface {
Name() string
ImporterPath() string
QuoteIdent(ident string) string
ParseDSN(params ConnParams) string
}
func GetDialectByName ¶
type Mssql ¶
type Mssql struct {
}
func (Mssql) ImporterPath ¶
func (Mssql) ParseDSN ¶
func (Mssql) ParseDSN(params ConnParams) string
func (Mssql) QuoteIdent ¶
type Mysql ¶
type Mysql struct {
}
func (Mysql) ImporterPath ¶
func (Mysql) ParseDSN ¶
func (Mysql) ParseDSN(params ConnParams) string
func (Mysql) QuoteIdent ¶
type Oracle ¶
type Oracle struct {
}
func (Oracle) ImporterPath ¶
func (Oracle) ParseDSN ¶
func (Oracle) ParseDSN(params ConnParams) string
func (Oracle) QuoteIdent ¶
type Postgres ¶
type Postgres struct {
}
func (Postgres) ImporterPath ¶
func (Postgres) ParseDSN ¶
func (Postgres) ParseDSN(params ConnParams) string
func (Postgres) QuoteIdent ¶
type Redis ¶
func (Redis) ImporterPath ¶
func (*Redis) ParseDSN ¶
func (r *Redis) ParseDSN(params ConnParams) string
func (*Redis) ParseOptions ¶
func (Redis) QuoteIdent ¶
type Sqlite ¶
type Sqlite struct {
}
func (Sqlite) ImporterPath ¶
func (Sqlite) ParseDSN ¶
func (Sqlite) ParseDSN(params ConnParams) string
func (Sqlite) QuoteIdent ¶
Click to show internal directories.
Click to hide internal directories.