mysql

package
v0.0.0-...-3d4e37e Latest Latest
Warning

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

Go to latest
Published: Nov 6, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DiffSchema

func DiffSchema(ctx context.Context, from, to ksql.ConnectionInterface, fromDbname, toDbname string) ksql.SqlInterface

func DiffTable

func DiffTable(ctx context.Context, fromTable, toTable schema.TableInfoInterface) ksql.SqlInterface

Types

type Changed

type Changed struct {
	// contains filtered or unexported fields
}

func (*Changed) Column

func (*Changed) Index

type Column

type Column struct {
	COLUMN_NAME              string
	COLUMN_DEFAULT           sql.NullString
	IS_NULLABLE              string
	DATA_TYPE                string
	CHARACTER_MAXIMUM_LENGTH sql.NullInt64
	NUMERIC_PRECISION        sql.NullInt32
	NUMERIC_SCALE            sql.NullInt32
	DATETIME_PRECISION       sql.NullInt32
	COLUMN_KEY               string
	EXTRA                    string
	COLUMN_COMMENT           sql.NullString
	// contains filtered or unexported fields
}

func (*Column) AutoIncrement

func (c *Column) AutoIncrement() bool

func (*Column) Clone

func (c *Column) Clone() ksql.RowInterface

func (*Column) Columns

func (c *Column) Columns() []string

func (*Column) Comment

func (c *Column) Comment() string

func (Column) Conn

func (b Column) Conn() ksql.ConnectionInterface

func (*Column) DateTimeLen

func (c *Column) DateTimeLen() int

func (*Column) Default

func (c *Column) Default() string

func (*Column) Extra

func (c *Column) Extra() string

func (Column) FromFetch

func (b Column) FromFetch()

func (*Column) HasChanged

func (c *Column) HasChanged(other schema.ColumnInfoInterface) bool

func (*Column) HasDefault

func (c *Column) HasDefault() bool

func (*Column) Key

func (c *Column) Key() string

func (*Column) Length

func (c *Column) Length() int

func (*Column) Name

func (c *Column) Name() string

func (*Column) Nullable

func (c *Column) Nullable() bool

func (*Column) NumLen

func (c *Column) NumLen() int

func (*Column) Scale

func (c *Column) Scale() int

func (Column) SetConn

func (b Column) SetConn(conn ksql.ConnectionInterface)

func (*Column) Type

func (c *Column) Type() string

func (*Column) Values

func (c *Column) Values() []any

type ColumnChanged

type ColumnChanged struct {
	// contains filtered or unexported fields
}

func (*ColumnChanged) Adds

func (*ColumnChanged) Changes

func (*ColumnChanged) Deletes

func (c *ColumnChanged) Deletes() []schema.ColumnInfoInterface

type ColumnMetaChanged

type ColumnMetaChanged struct {
	// contains filtered or unexported fields
}

func (*ColumnMetaChanged) New

func (*ColumnMetaChanged) Old

type Index

type Index struct {
	Table         string
	Non_unique    int
	Key_name      string
	Seq_in_index  int
	Column_name   string
	Collation     string
	Cardinality   int
	Sub_part      sql.NullString
	Packed        sql.NullString
	Null          string
	Index_type    string
	Index_comment string
	Comm          string
	Visible       string
	Expression    sql.NullString
	// contains filtered or unexported fields
}

func (*Index) Clone

func (i *Index) Clone() ksql.RowInterface

func (*Index) Column

func (i *Index) Column() string

func (*Index) Columns

func (i *Index) Columns() []string

func (*Index) Comment

func (i *Index) Comment() string

func (Index) Conn

func (b Index) Conn() ksql.ConnectionInterface

func (Index) FromFetch

func (b Index) FromFetch()

func (*Index) HasChanged

func (i *Index) HasChanged(other schema.IndexMetaInterface) bool

func (*Index) IndexComment

func (i *Index) IndexComment() string

func (*Index) Name

func (i *Index) Name() string

func (*Index) NonUnique

func (i *Index) NonUnique() int

func (*Index) Seq

func (i *Index) Seq() int

func (Index) SetConn

func (b Index) SetConn(conn ksql.ConnectionInterface)

func (*Index) Type

func (i *Index) Type() ksql.IndexType

func (*Index) Values

func (i *Index) Values() []any

type IndexChanged

type IndexChanged struct {
	// contains filtered or unexported fields
}

func (*IndexChanged) Adds

func (*IndexChanged) Deletes

func (i *IndexChanged) Deletes() []schema.IndexInfoInterface

type Schema

type Schema struct {
	SCHEMA_NAME                string
	DEFAULT_CHARACTER_SET_NAME string
	DEFAULT_COLLATION_NAME     string
	// contains filtered or unexported fields
}

func (*Schema) Charset

func (s *Schema) Charset() string

func (*Schema) Clone

func (s *Schema) Clone() ksql.RowInterface

func (*Schema) Collation

func (s *Schema) Collation() string

func (*Schema) Columns

func (s *Schema) Columns() []string

func (Schema) Conn

func (b Schema) Conn() ksql.ConnectionInterface

func (Schema) FromFetch

func (b Schema) FromFetch()

func (*Schema) HasChanged

func (s *Schema) HasChanged(other schema.SchemaInfoInterface) bool

func (*Schema) HasTable

func (s *Schema) HasTable(table schema.TableInfoInterface) bool

func (*Schema) Name

func (s *Schema) Name() string

func (Schema) SetConn

func (b Schema) SetConn(conn ksql.ConnectionInterface)

func (*Schema) SetTables

func (s *Schema) SetTables(tables []schema.TableInfoInterface)

func (*Schema) Tables

func (s *Schema) Tables() []schema.TableInfoInterface

func (*Schema) Values

func (s *Schema) Values() []any

type Table

type Table struct {
	TABLE_NAME      string
	ENGINE          string
	TABLE_COLLATION string
	TABLE_COMMENT   string
	// contains filtered or unexported fields
}

func NewTable

func NewTable(conn ksql.ConnectionInterface) *Table

func (*Table) Charset

func (t *Table) Charset() string

func (*Table) CheckChanges

func (t *Table) CheckChanges(other schema.TableInfoInterface) schema.ChangedInterface

func (*Table) Clone

func (t *Table) Clone() ksql.RowInterface

func (*Table) Collation

func (t *Table) Collation() string

func (*Table) Columns

func (t *Table) Columns() []string

func (*Table) Comment

func (t *Table) Comment() string

func (Table) Conn

func (b Table) Conn() ksql.ConnectionInterface

func (*Table) Engine

func (t *Table) Engine() string

func (*Table) Fields

func (t *Table) Fields() []schema.ColumnInfoInterface

func (Table) FromFetch

func (b Table) FromFetch()

func (*Table) GetColumn

func (t *Table) GetColumn(column string) schema.ColumnInfoInterface

func (*Table) GetIndex

func (t *Table) GetIndex(index string) schema.IndexInfoInterface

func (*Table) HasChanged

func (t *Table) HasChanged(other schema.TableInfoInterface) bool

func (*Table) HasColumn

func (t *Table) HasColumn(column schema.ColumnInfoInterface) bool

func (*Table) HasIndex

func (t *Table) HasIndex(index schema.IndexInfoInterface) bool

func (*Table) Indexes

func (t *Table) Indexes() []schema.IndexInfoInterface

func (*Table) Name

func (t *Table) Name() string

func (*Table) SetColumns

func (t *Table) SetColumns(columns []schema.ColumnInfoInterface) schema.TableInfoInterface

func (Table) SetConn

func (b Table) SetConn(conn ksql.ConnectionInterface)

func (*Table) SetIndexes

func (t *Table) SetIndexes(indexes []schema.IndexMetaInterface) schema.TableInfoInterface

func (*Table) Values

func (t *Table) Values() []any

type TableIndex

type TableIndex struct {
	// contains filtered or unexported fields
}

func (*TableIndex) Add

func (*TableIndex) Columns

func (t *TableIndex) Columns() []string

func (*TableIndex) HasChanged

func (t *TableIndex) HasChanged(other schema.IndexInfoInterface) bool

func (*TableIndex) Metas

func (t *TableIndex) Metas() []schema.IndexMetaInterface

func (*TableIndex) Name

func (t *TableIndex) Name() string

func (*TableIndex) Type

func (t *TableIndex) Type() ksql.IndexType

Jump to

Keyboard shortcuts

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