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 ¶ added in v0.9.1
func (Mssql) ParseDSN ¶ added in v0.3.2
func (Mssql) ParseDSN(params ConnParams) string
func (Mssql) QuoteIdent ¶
type Mysql ¶
type Mysql struct { }
func (Mysql) ImporterPath ¶ added in v0.9.1
func (Mysql) ParseDSN ¶ added in v0.3.2
func (Mysql) ParseDSN(params ConnParams) string
func (Mysql) QuoteIdent ¶
type Oracle ¶
type Oracle struct { }
func (Oracle) ImporterPath ¶ added in v0.9.1
func (Oracle) ParseDSN ¶ added in v0.3.2
func (Oracle) ParseDSN(params ConnParams) string
func (Oracle) QuoteIdent ¶
type Postgres ¶
type Postgres struct { }
func (Postgres) ImporterPath ¶ added in v0.9.1
func (Postgres) ParseDSN ¶ added in v0.3.2
func (Postgres) ParseDSN(params ConnParams) string
func (Postgres) QuoteIdent ¶
type Redis ¶
func (Redis) ImporterPath ¶ added in v0.9.1
func (*Redis) ParseDSN ¶ added in v0.3.2
func (r *Redis) ParseDSN(params ConnParams) string
func (*Redis) ParseOptions ¶ added in v0.9.5
func (Redis) QuoteIdent ¶
type Sqlite ¶
type Sqlite struct { }
func (Sqlite) ImporterPath ¶ added in v0.9.1
func (Sqlite) ParseDSN ¶ added in v0.3.2
func (Sqlite) ParseDSN(params ConnParams) string
func (Sqlite) QuoteIdent ¶
Click to show internal directories.
Click to hide internal directories.