Documentation
¶
Overview ¶
Package sqlserver 实现了sqlserver的数据库方言Dialect,支持mssql 2005+ 对应数据库
Index ¶
- Constants
- func NewSource(bs *database.BaseSource) (s database.Source, err error)
- func Quoted(s string) string
- type Config
- type CopyInParam
- type Dialect
- type Field
- type FieldType
- type Scanner
- type Source
- type Table
- func (t *Table) AddField(baseField *database.BaseField)
- func (t *Table) ExecParam(mode string, txOpts *sql.TxOptions) (database.Parameter, bool)
- func (t *Table) Quoted() string
- func (t *Table) SetConfig(conf *config.JSON)
- func (t *Table) ShouldOneByOne(err error) bool
- func (t *Table) ShouldRetry(err error) bool
- func (t *Table) String() string
- type Valuer
Constants ¶
View Source
const WriteModeCopyIn = "copyIn"
WriteModeCopyIn copy in写入方式
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶
type Config struct {
URL string `json:"url"` //数据库url,包含数据库地址,数据库其他参数
Username string `json:"username"` //用户名
Password string `json:"password"` //密码
}
Config mssql配置
type CopyInParam ¶
CopyInParam copy in 参数
func NewCopyInParam ¶
func NewCopyInParam(t database.Table, txOpts *sql.TxOptions) *CopyInParam
NewCopyInParam 通过表table和事务参数txOpts插入参数
type FieldType ¶
type FieldType struct {
*database.BaseFieldType
// contains filtered or unexported fields
}
FieldType 字段类型
type Scanner ¶
type Scanner struct {
database.BaseScanner
// contains filtered or unexported fields
}
Scanner 扫描器
type Source ¶
type Source struct {
*database.BaseSource //基础数据源
// contains filtered or unexported fields
}
Source mssql数据源
func (*Source) ConnectName ¶
ConnectName github.com/denisenkom/go-mssqldb的数据源连接信息
func (*Source) DriverName ¶
DriverName github.com/denisenkom/go-mssqldb的驱动名
Click to show internal directories.
Click to hide internal directories.