Documentation
¶
Overview ¶
Package db2 implements the Dialect of db2 database, supporting the corresponding database of db2 9.x+
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶
type Config struct {
URL string `json:"url"` // Database URL, including database address and other database parameters
Username string `json:"username"` // Username
Password string `json:"password"` // Password
}
Config configuration ibm.com/docs/en/db2/11.1?topic=file-data-server-driver-configuration-keywords
type Dialect ¶
type Dialect struct{}
Dialect is the dialect for the DB2 database
type Field ¶
type Field struct {
*database.BaseField
database.BaseConfigSetter
}
Field represents a database field.
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 determines whether parsing is supported.
type Scanner ¶
type Scanner struct {
database.BaseScanner
// contains filtered or unexported fields
}
Scanner is used for scanning data based on column types.
func NewScanner ¶
NewScanner generates a scanner based on the column type.
func (*Scanner) Scan ¶
Scan reads data based on the column type. INTEGER, BIGINT, and SMALLINT are treated as integers. DOUBLE, REAL, and DECIMAL are treated as high-precision real numbers. DATE, TIME, and TIMESTAMP are treated as time values. CHAR and VARCHAR are treated as strings. BLOB is treated as a byte stream. BOOLEAN is treated as a boolean value.
type Source ¶
type Source struct {
*database.BaseSource // Basic data source
// contains filtered or unexported fields
}
Source is the DB2 data source
func (*Source) ConnectName ¶
ConnectName is the connection information for the data source from github.com/ibmdb/go_ibm_db
func (*Source) DriverName ¶
DriverName is the driver name for github.com/ibmdb/go_ibm_db
type Table ¶
type Table struct {
*database.BaseTable
database.BaseConfigSetter
}
Table - A db2 table
func NewTable ¶
NewTable - Creates a db2 table. Note that the schema parameter in BaseTable is empty at this point, instance is the database name, and name is the table name.
func (*Table) ShouldOneByOne ¶
ShouldOneByOne - Retry individually