Documentation ¶
Overview ¶
Package sqlserver implements the Dialect for SQL Server databases, supporting MSSQL 2005+ corresponding databases.
Index ¶
Constants ¶
const WriteModeCopyIn = "copyIn"
WriteModeCopyIn represents the copy in write mode.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶
type Config struct { URL string `json:"url"` // Database URL, including the database address and other database parameters Username string `json:"username"` // Username Password string `json:"password"` // Password }
Config is the MSSQL configuration
type CopyInParam ¶
CopyInParam represents the parameters for the copy in operation.
func NewCopyInParam ¶
func NewCopyInParam(t database.Table, txOpts *sql.TxOptions) *CopyInParam
NewCopyInParam creates copy-in parameters based on the table and transaction options (txOpts).
type Dialect ¶
type Dialect struct{}
Dialect represents the database dialect for MSSQL
type Field ¶
type Field struct { database.BaseConfigSetter *database.BaseField }
Field - Represents a field in a database table.
type FieldType ¶
type FieldType struct { *database.BaseFieldType // contains filtered or unexported fields }
FieldType - Represents the type of a field.
func NewFieldType ¶
func NewFieldType(typ database.ColumnType) *FieldType
NewFieldType - Creates a new field type.
func (*FieldType) IsSupported ¶ added in v0.1.8
IsSupported - Indicates whether parsing is supported for a specific type.
type Scanner ¶
type Scanner struct { database.BaseScanner // contains filtered or unexported fields }
Scanner - A scanner used for reading data based on the column type.
func NewScanner ¶
NewScanner - Generates a scanner based on the column type.
type Source ¶
type Source struct { *database.BaseSource // Basic data source // contains filtered or unexported fields }
Source mssql refers to the MSSQL data source
func (*Source) ConnectName ¶
ConnectName is the connection information for the MSSQL data source using github.com/microsoft/go-mssqldb
func (*Source) DriverName ¶
DriverName is the driver name for github.com/microsoft/go-mssqldb
type Table ¶
type Table struct { database.BaseConfigSetter *database.BaseTable }
Table represents an MSSQL table.
func NewTable ¶
NewTable creates a new MSSQL table. Note that at this point, the schema parameter in BaseTable is empty, instance is the database name, and name is the table name.
func (*Table) ExecParam ¶
ExecParam retrieves execution parameters, where the replace into parameter mode has been registered.
func (*Table) ShouldOneByOne ¶
ShouldOneByOne specifies whether to retry one operation at a time.
func (*Table) ShouldRetry ¶
ShouldRetry determines whether a retry is necessary.