Documentation ¶
Overview ¶
Package coltypes implements functions for converting DB2 column types to appropriate Go types.
Index ¶
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func ConvertStructureData ¶
func ConvertStructureData( _ context.Context, columnTypes map[string]string, data sdk.StructuredData, ) (sdk.StructuredData, error)
ConvertStructureData converts a sdk.StructureData values to a proper database types.
Types ¶
type Querier ¶
type Querier interface {
QueryContext(ctx context.Context, query string, args ...any) (*sql.Rows, error)
}
Querier is a database querier interface needed for the GetTableInfo function.
type TableInfo ¶
type TableInfo struct { // ColumnTypes - column name with column type. ColumnTypes map[string]string // ColumnLengths - column name with length ColumnLengths map[string]int // PrimaryKeys - primary keys column names. PrimaryKeys []string }
TableInfo - information about colum types, primary keys from table.
func GetTableInfo ¶
GetTableInfo returns a map containing all table's columns and their database types and returns primary columns names.
func (TableInfo) GetCreateColumnStr ¶
Click to show internal directories.
Click to hide internal directories.