mysql

package
v0.1.19 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 14, 2026 License: MIT Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsConflictError

func IsConflictError(err error) bool

func IsUnknownDatabaseError

func IsUnknownDatabaseError(err error) bool

func ParseDSN

func ParseDSN(dsn string) (string, error)

func ScanCatalog

func ScanCatalog(ctx context.Context, a adaptor.Adaptor, database string) (builder.Catalog, error)

func UnwrapError

func UnwrapError(err error) *mysql.MySQLError

Types

type TSchemaTableColumn

type TSchemaTableColumn struct {
	TableSchema       string `db:"table_schema"`
	Table             string `db:"table_name"`
	ColumnName        string `db:"column_name"`
	RawDataType       string `db:"data_type"`
	DataType          string `db:"column_type"`
	VarcharLength     uint64 `db:"character_maximum_length"` // char,varchar
	BinaryLength      uint64 `db:"character_octet_length"`   // binary,varbinary
	NumericWidth      uint64 `db:"numeric_precision"`        // decimal,numeric,float,double
	NumericPrecision  uint64 `db:"numeric_scale"`            // decimal,numeric
	DatetimePrecision uint64 `db:"datetime_precision"`       // datetime/timestamp/time
	DefaultValue      string `db:"column_default"`
	IsNullable        string `db:"is_nullable"`
	Extra             string `db:"extra"`
	OrdinalPosition   string `db:"ordinal_position"`
}

func (TSchemaTableColumn) TableName

func (TSchemaTableColumn) TableName() string

func (*TSchemaTableColumn) ToCol

func (t *TSchemaTableColumn) ToCol() builder.Col

type TSchemaTableIndex

type TSchemaTableIndex struct {
	TableSchema string `db:"table_schema"`
	IndexType   string `db:"index_type"`
	IndexName   string `db:"index_name"`
	NonUnique   int    `db:"non_unique"`
	Table       string `db:"table_name"`
	ColumnName  string `db:"column_name"`
	SeqInIndex  int    `db:"seq_in_index"`
}

func (TSchemaTableIndex) TableName

func (TSchemaTableIndex) TableName() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL