Documentation
¶
Index ¶
- func DiffSchema(ctx context.Context, from, to ksql.ConnectionInterface, ...) ksql.SqlInterface
- func DiffTable(ctx context.Context, fromTable, toTable schema.TableInfoInterface) ksql.SqlInterface
- func Tables(ctx context.Context, conn ksql.ConnectionInterface, dbname string) ([]schema.TableInfoInterface, error)
- type Changed
- type Column
- func (c *Column) AutoIncrement() bool
- func (c *Column) Clone() ksql.RowInterface
- func (c *Column) Columns() []string
- func (c *Column) Comment() string
- func (b Column) Conn() ksql.ConnectionInterface
- func (c *Column) DateTimeLen() int
- func (c *Column) Default() string
- func (c *Column) Extra() string
- func (b Column) FromFetch()
- func (c *Column) HasChanged(other schema.ColumnInfoInterface) bool
- func (c *Column) HasDefault() bool
- func (c *Column) Key() string
- func (c *Column) Length() int
- func (c *Column) Name() string
- func (c *Column) Nullable() bool
- func (c *Column) NumLen() int
- func (c *Column) Scale() int
- func (b Column) SetConn(conn ksql.ConnectionInterface)
- func (c *Column) Type() string
- func (c *Column) Values() []any
- type ColumnChanged
- type ColumnMetaChanged
- type Index
- func (i *Index) Clone() ksql.RowInterface
- func (i *Index) Column() string
- func (i *Index) Columns() []string
- func (i *Index) Comment() string
- func (b Index) Conn() ksql.ConnectionInterface
- func (b Index) FromFetch()
- func (i *Index) HasChanged(other schema.IndexMetaInterface) bool
- func (i *Index) IndexComment() string
- func (i *Index) Name() string
- func (i *Index) NonUnique() int
- func (i *Index) Seq() int
- func (b Index) SetConn(conn ksql.ConnectionInterface)
- func (i *Index) Type() ksql.IndexType
- func (i *Index) Values() []any
- type IndexChanged
- type Schema
- func (s *Schema) Charset() string
- func (s *Schema) Clone() ksql.RowInterface
- func (s *Schema) Collation() string
- func (s *Schema) Columns() []string
- func (b Schema) Conn() ksql.ConnectionInterface
- func (b Schema) FromFetch()
- func (s *Schema) HasChanged(other schema.SchemaInfoInterface) bool
- func (s *Schema) HasTable(table schema.TableInfoInterface) bool
- func (s *Schema) Name() string
- func (b Schema) SetConn(conn ksql.ConnectionInterface)
- func (s *Schema) SetTables(tables []schema.TableInfoInterface)
- func (s *Schema) Tables() []schema.TableInfoInterface
- func (s *Schema) Values() []any
- type Table
- func (t *Table) Charset() string
- func (t *Table) CheckChanges(other schema.TableInfoInterface) schema.ChangedInterface
- func (t *Table) Clone() ksql.RowInterface
- func (t *Table) Collation() string
- func (t *Table) Columns() []string
- func (t *Table) Comment() string
- func (b Table) Conn() ksql.ConnectionInterface
- func (t *Table) Engine() string
- func (t *Table) Fields() []schema.ColumnInfoInterface
- func (b Table) FromFetch()
- func (t *Table) GetColumn(column string) schema.ColumnInfoInterface
- func (t *Table) GetIndex(index string) schema.IndexInfoInterface
- func (t *Table) HasChanged(other schema.TableInfoInterface) bool
- func (t *Table) HasColumn(column schema.ColumnInfoInterface) bool
- func (t *Table) HasIndex(index schema.IndexInfoInterface) bool
- func (t *Table) Indexes() []schema.IndexInfoInterface
- func (t *Table) Name() string
- func (t *Table) SetColumns(columns []schema.ColumnInfoInterface) schema.TableInfoInterface
- func (b Table) SetConn(conn ksql.ConnectionInterface)
- func (t *Table) SetIndexes(indexes []schema.IndexMetaInterface) schema.TableInfoInterface
- func (t *Table) Values() []any
- type TableIndex
- func (t *TableIndex) Add(index schema.IndexMetaInterface) schema.IndexInfoInterface
- func (t *TableIndex) Columns() []string
- func (t *TableIndex) HasChanged(other schema.IndexInfoInterface) bool
- func (t *TableIndex) Metas() []schema.IndexMetaInterface
- func (t *TableIndex) Name() string
- func (t *TableIndex) Type() ksql.IndexType
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
func Tables ¶
func Tables(ctx context.Context, conn ksql.ConnectionInterface, dbname string) ([]schema.TableInfoInterface, error)
Types ¶
type Changed ¶
type Changed struct {
// contains filtered or unexported fields
}
func (*Changed) Column ¶
func (c *Changed) Column() schema.ColumnChangedInterface
func (*Changed) Index ¶
func (c *Changed) Index() schema.IndexChangedInterface
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 (*Column) Clone ¶
func (c *Column) Clone() ksql.RowInterface
func (*Column) DateTimeLen ¶
func (*Column) HasChanged ¶
func (c *Column) HasChanged(other schema.ColumnInfoInterface) bool
func (*Column) HasDefault ¶
type ColumnChanged ¶
type ColumnChanged struct {
// contains filtered or unexported fields
}
func (*ColumnChanged) Adds ¶
func (c *ColumnChanged) Adds() []schema.ColumnInfoInterface
func (*ColumnChanged) Changes ¶
func (c *ColumnChanged) Changes() []schema.ColumnMetaChangedInterface
func (*ColumnChanged) Deletes ¶
func (c *ColumnChanged) Deletes() []schema.ColumnInfoInterface
type ColumnMetaChanged ¶
type ColumnMetaChanged struct {
// contains filtered or unexported fields
}
func (*ColumnMetaChanged) New ¶
func (c *ColumnMetaChanged) New() schema.ColumnInfoInterface
func (*ColumnMetaChanged) Old ¶
func (c *ColumnMetaChanged) Old() schema.ColumnInfoInterface
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) HasChanged ¶
func (i *Index) HasChanged(other schema.IndexMetaInterface) bool
func (*Index) IndexComment ¶
type IndexChanged ¶
type IndexChanged struct {
// contains filtered or unexported fields
}
func (*IndexChanged) Adds ¶
func (i *IndexChanged) Adds() []schema.IndexInfoInterface
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) Clone ¶
func (s *Schema) Clone() ksql.RowInterface
func (*Schema) HasChanged ¶
func (s *Schema) HasChanged(other schema.SchemaInfoInterface) bool
func (*Schema) SetTables ¶
func (s *Schema) SetTables(tables []schema.TableInfoInterface)
func (*Schema) Tables ¶
func (s *Schema) Tables() []schema.TableInfoInterface
type Table ¶
type Table struct { TABLE_NAME string ENGINE string TABLE_COLLATION string TABLE_COMMENT string // contains filtered or unexported fields }
func (*Table) CheckChanges ¶
func (t *Table) CheckChanges(other schema.TableInfoInterface) schema.ChangedInterface
func (*Table) Fields ¶
func (t *Table) Fields() []schema.ColumnInfoInterface
func (*Table) HasChanged ¶
func (t *Table) HasChanged(other schema.TableInfoInterface) bool
func (*Table) Indexes ¶
func (t *Table) Indexes() []schema.IndexInfoInterface
func (*Table) SetColumns ¶
func (t *Table) SetColumns(columns []schema.ColumnInfoInterface) schema.TableInfoInterface
func (*Table) SetIndexes ¶
func (t *Table) SetIndexes(indexes []schema.IndexMetaInterface) schema.TableInfoInterface
type TableIndex ¶
type TableIndex struct {
// contains filtered or unexported fields
}
func (*TableIndex) Add ¶
func (t *TableIndex) Add(index schema.IndexMetaInterface) schema.IndexInfoInterface
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
Source Files
¶
Click to show internal directories.
Click to hide internal directories.