Documentation ¶
Overview ¶
Copyright © 2020 Marvin
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright © 2020 Marvin ¶
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright © 2020 Marvin ¶
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Index ¶
- type ColumnRouteRule
- type DataCompareRule
- type DataMigrateRule
- type DataScanRule
- type IColumnRouteRule
- type IDataCompareRule
- type IDataMigrateRule
- type IDataScanRule
- type IMigrateTaskSequence
- type IMigrateTaskTable
- type ISchemaRouteRule
- type ISqlMigrateRule
- type ITableRouteRule
- type MigrateTaskSequence
- type MigrateTaskTable
- type RWColumnRouteRule
- func (rw *RWColumnRouteRule) CreateColumnRouteRule(ctx context.Context, rule *ColumnRouteRule) (*ColumnRouteRule, error)
- func (rw *RWColumnRouteRule) CreateInBatchColumnRouteRule(ctx context.Context, rule []*ColumnRouteRule, thread, batchSize int) ([]*ColumnRouteRule, error)
- func (rw *RWColumnRouteRule) DeleteColumnRouteRule(ctx context.Context, taskNames []string) error
- func (rw *RWColumnRouteRule) FindColumnRouteRule(ctx context.Context, rule *ColumnRouteRule) ([]*ColumnRouteRule, error)
- func (rw *RWColumnRouteRule) GetColumnRouteRule(ctx context.Context, rule *ColumnRouteRule) (*ColumnRouteRule, error)
- func (rw *RWColumnRouteRule) ListColumnRouteRule(ctx context.Context, page uint64, pageSize uint64) ([]*ColumnRouteRule, error)
- func (rw *RWColumnRouteRule) QueryColumnRouteRule(ctx context.Context, rule *ColumnRouteRule) ([]*ColumnRouteRule, error)
- func (rw *RWColumnRouteRule) TableName(ctx context.Context) string
- func (rw *RWColumnRouteRule) UpdateColumnRouteRule(ctx context.Context, rule *ColumnRouteRule) (*ColumnRouteRule, error)
- type RWDataCompareRule
- func (rw *RWDataCompareRule) CreateDataCompareRule(ctx context.Context, rule *DataCompareRule) (*DataCompareRule, error)
- func (rw *RWDataCompareRule) CreateInBatchDataCompareRule(ctx context.Context, rule []*DataCompareRule, thread, batchSize int) ([]*DataCompareRule, error)
- func (rw *RWDataCompareRule) DeleteDataCompareRule(ctx context.Context, taskNames []string) error
- func (rw *RWDataCompareRule) FindDataCompareRule(ctx context.Context, rule *DataCompareRule) ([]*DataCompareRule, error)
- func (rw *RWDataCompareRule) GetDataCompareRule(ctx context.Context, rule *DataCompareRule) (*DataCompareRule, error)
- func (rw *RWDataCompareRule) IsContainedDataCompareRuleRecord(ctx context.Context, rule *DataCompareRule) (bool, error)
- func (rw *RWDataCompareRule) TableName(ctx context.Context) string
- func (rw *RWDataCompareRule) UpdateDataCompareRule(ctx context.Context, rule *DataCompareRule) (*DataCompareRule, error)
- type RWDataMigrateRule
- func (rw *RWDataMigrateRule) CreateDataMigrateRule(ctx context.Context, rule *DataMigrateRule) (*DataMigrateRule, error)
- func (rw *RWDataMigrateRule) CreateInBatchDataMigrateRule(ctx context.Context, rule []*DataMigrateRule, thread, batchSize int) ([]*DataMigrateRule, error)
- func (rw *RWDataMigrateRule) DeleteDataMigrateRule(ctx context.Context, taskNames []string) error
- func (rw *RWDataMigrateRule) FindDataMigrateRule(ctx context.Context, rule *DataMigrateRule) ([]*DataMigrateRule, error)
- func (rw *RWDataMigrateRule) GetDataMigrateRule(ctx context.Context, rule *DataMigrateRule) (*DataMigrateRule, error)
- func (rw *RWDataMigrateRule) IsContainedDataMigrateRuleRecord(ctx context.Context, rule *DataMigrateRule) (bool, error)
- func (rw *RWDataMigrateRule) TableName(ctx context.Context) string
- func (rw *RWDataMigrateRule) UpdateDataMigrateRule(ctx context.Context, rule *DataMigrateRule) (*DataMigrateRule, error)
- type RWDataScanRule
- func (rw *RWDataScanRule) CreateDataScanRule(ctx context.Context, rule *DataScanRule) (*DataScanRule, error)
- func (rw *RWDataScanRule) CreateInBatchDataScanRule(ctx context.Context, rule []*DataScanRule, thread, batchSize int) ([]*DataScanRule, error)
- func (rw *RWDataScanRule) DeleteDataScanRule(ctx context.Context, taskNames []string) error
- func (rw *RWDataScanRule) FindDataScanRule(ctx context.Context, rule *DataScanRule) ([]*DataScanRule, error)
- func (rw *RWDataScanRule) GetDataScanRule(ctx context.Context, rule *DataScanRule) (*DataScanRule, error)
- func (rw *RWDataScanRule) IsContainedDataScanRuleRecord(ctx context.Context, rule *DataScanRule) (bool, error)
- func (rw *RWDataScanRule) TableName(ctx context.Context) string
- func (rw *RWDataScanRule) UpdateDataScanRule(ctx context.Context, rule *DataScanRule) (*DataScanRule, error)
- type RWMigrateTaskSequence
- func (rw *RWMigrateTaskSequence) CreateMigrateTaskSequence(ctx context.Context, rule *MigrateTaskSequence) (*MigrateTaskSequence, error)
- func (rw *RWMigrateTaskSequence) DeleteMigrateTaskSequence(ctx context.Context, taskName []string) error
- func (rw *RWMigrateTaskSequence) DeleteMigrateTaskSequenceByTaskIsExclude(ctx context.Context, rule *MigrateTaskSequence) error
- func (rw *RWMigrateTaskSequence) FindMigrateTaskSequence(ctx context.Context, rule *MigrateTaskSequence) ([]*MigrateTaskSequence, error)
- func (rw *RWMigrateTaskSequence) GetMigrateTaskSequence(ctx context.Context, rule *MigrateTaskSequence) (*MigrateTaskSequence, error)
- func (rw *RWMigrateTaskSequence) ListMigrateTaskSequence(ctx context.Context, page uint64, pageSize uint64) ([]*MigrateTaskSequence, error)
- func (rw *RWMigrateTaskSequence) TableName(ctx context.Context) string
- func (rw *RWMigrateTaskSequence) UpdateMigrateTaskSequence(ctx context.Context, rule *MigrateTaskSequence) (*MigrateTaskSequence, error)
- type RWMigrateTaskTable
- func (rw *RWMigrateTaskTable) CreateMigrateTaskTable(ctx context.Context, rule *MigrateTaskTable) (*MigrateTaskTable, error)
- func (rw *RWMigrateTaskTable) DeleteMigrateTaskTable(ctx context.Context, taskName []string) error
- func (rw *RWMigrateTaskTable) DeleteMigrateTaskTableByTaskIsExclude(ctx context.Context, rule *MigrateTaskTable) error
- func (rw *RWMigrateTaskTable) FindMigrateTaskTable(ctx context.Context, rule *MigrateTaskTable) ([]*MigrateTaskTable, error)
- func (rw *RWMigrateTaskTable) GetMigrateTaskTable(ctx context.Context, rule *MigrateTaskTable) (*MigrateTaskTable, error)
- func (rw *RWMigrateTaskTable) ListMigrateTaskTable(ctx context.Context, page uint64, pageSize uint64) ([]*MigrateTaskTable, error)
- func (rw *RWMigrateTaskTable) TableName(ctx context.Context) string
- func (rw *RWMigrateTaskTable) UpdateMigrateTaskTable(ctx context.Context, rule *MigrateTaskTable) (*MigrateTaskTable, error)
- type RWSchemaRouteRule
- func (rw *RWSchemaRouteRule) CreateSchemaRouteRule(ctx context.Context, rule *SchemaRouteRule) (*SchemaRouteRule, error)
- func (rw *RWSchemaRouteRule) DeleteSchemaRouteRule(ctx context.Context, taskName []string) error
- func (rw *RWSchemaRouteRule) GetSchemaRouteRule(ctx context.Context, rule *SchemaRouteRule) (*SchemaRouteRule, error)
- func (rw *RWSchemaRouteRule) ListSchemaRouteRule(ctx context.Context, page uint64, pageSize uint64) ([]*SchemaRouteRule, error)
- func (rw *RWSchemaRouteRule) TableName(ctx context.Context) string
- func (rw *RWSchemaRouteRule) UpdateSchemaRouteRule(ctx context.Context, rule *SchemaRouteRule) (*SchemaRouteRule, error)
- type RWSqlMigrateRule
- func (rw *RWSqlMigrateRule) CreateInBatchSqlMigrateRule(ctx context.Context, rule []*SqlMigrateRule, thread, batchSize int) ([]*SqlMigrateRule, error)
- func (rw *RWSqlMigrateRule) CreateSqlMigrateRule(ctx context.Context, rule *SqlMigrateRule) (*SqlMigrateRule, error)
- func (rw *RWSqlMigrateRule) DeleteSqlMigrateRule(ctx context.Context, taskNames []string) error
- func (rw *RWSqlMigrateRule) FindSqlMigrateRule(ctx context.Context, rule *SqlMigrateRule) ([]*SqlMigrateRule, error)
- func (rw *RWSqlMigrateRule) FindSqlMigrateRuleGroupBySchemaTable(ctx context.Context) ([]*SqlMigrateRuleGroupSchemaTableTResult, error)
- func (rw *RWSqlMigrateRule) GetSqlMigrateRule(ctx context.Context, rule *SqlMigrateRule) (*SqlMigrateRule, error)
- func (rw *RWSqlMigrateRule) TableName(ctx context.Context) string
- func (rw *RWSqlMigrateRule) UpdateSqlMigrateRule(ctx context.Context, rule *SqlMigrateRule) (*SqlMigrateRule, error)
- type RWTableRouteRule
- func (rw *RWTableRouteRule) CreateInBatchTableRouteRule(ctx context.Context, rule []*TableRouteRule, thread, batchSize int) ([]*TableRouteRule, error)
- func (rw *RWTableRouteRule) CreateTableRouteRule(ctx context.Context, rule *TableRouteRule) (*TableRouteRule, error)
- func (rw *RWTableRouteRule) DeleteTableRouteRule(ctx context.Context, taskNames []string) error
- func (rw *RWTableRouteRule) FindTableRouteRule(ctx context.Context, rule *TableRouteRule) ([]*TableRouteRule, error)
- func (rw *RWTableRouteRule) GetTableRouteRule(ctx context.Context, rule *TableRouteRule) (*TableRouteRule, error)
- func (rw *RWTableRouteRule) ListTableRouteRule(ctx context.Context, page uint64, pageSize uint64) ([]*TableRouteRule, error)
- func (rw *RWTableRouteRule) TableName(ctx context.Context) string
- func (rw *RWTableRouteRule) UpdateTableRouteRule(ctx context.Context, rule *TableRouteRule) (*TableRouteRule, error)
- type SchemaRouteRule
- type SqlMigrateRule
- type SqlMigrateRuleGroupSchemaTableTResult
- type TableRouteRule
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ColumnRouteRule ¶
type ColumnRouteRule struct { ID uint64 `gorm:"primary_key;autoIncrement;comment:id" json:"id"` TaskName string `gorm:"type:varchar(300);not null;uniqueIndex:uniq_schema_table_name;comment:migrate task name" json:"taskName"` SchemaNameS string `gorm:"type:varchar(120);not null;uniqueIndex:uniq_schema_table_name;comment:source schema name" json:"schemaNameS"` TableNameS string `gorm:"type:varchar(120);not null;uniqueIndex:uniq_schema_table_name;comment:source table name" json:"tableNameS"` ColumnNameS string `gorm:"type:varchar(120);not null;uniqueIndex:uniq_schema_table_name;comment:source table name" json:"columnNameS"` SchemaNameT string `gorm:"type:varchar(120);not null;comment:target schema name" json:"schemaNameT"` TableNameT string `gorm:"type:varchar(120);not null;comment:target table name" json:"tableNameT"` ColumnNameT string `gorm:"type:varchar(120);not null;comment:source table name" json:"columnNameT"` *common.Entity }
type DataCompareRule ¶
type DataCompareRule struct { ID uint64 `gorm:"primary_key;autoIncrement;comment:id" json:"id"` TaskName string `gorm:"type:varchar(300);not null;uniqueIndex:uniq_schema_table_name;comment:migrate task datasource name" json:"taskName"` SchemaNameS string `gorm:"type:varchar(120);not null;uniqueIndex:uniq_schema_table_name;comment:source schema name" json:"schemaNameS"` TableNameS string `gorm:"type:varchar(120);not null;uniqueIndex:uniq_schema_table_name;comment:source table name" json:"tableNameS"` CompareConditionField string `gorm:"type:varchar(120);comment:compare filed" json:"compareConditionField"` CompareConditionRangeS string `gorm:"type:varchar(120);comment:source sql query where" json:"compareConditionRangeS"` CompareConditionRangeT string `gorm:"type:varchar(120);comment:target sql query where" json:"compareConditionRangeT"` IgnoreSelectFields string `gorm:"type:text;comment:ignore select filed" json:"ignoreSelectFields"` IgnoreConditionFields string `gorm:"type:text;comment:ignore condition filed" json:"ignoreConditionFields"` SqlHintS string `gorm:"type:varchar(120);comment:source sql query hint" json:"sqlHintS"` SqlHintT string `gorm:"type:varchar(120);comment:target sql query hint" json:"sqlHintT"` *common.Entity }
type DataMigrateRule ¶
type DataMigrateRule struct { ID uint64 `gorm:"primary_key;autoIncrement;comment:id" json:"id"` TaskName string `gorm:"type:varchar(300);not null;uniqueIndex:uniq_schema_table_name;comment:migrate task datasource name" json:"taskName"` SchemaNameS string `gorm:"type:varchar(120);not null;uniqueIndex:uniq_schema_table_name;comment:source schema name" json:"schemaNameS"` TableNameS string `gorm:"type:varchar(120);not null;uniqueIndex:uniq_schema_table_name;comment:source table name" json:"tableNameS"` EnableChunkStrategy string `gorm:"type:varchar(120);comment:enable chunk strategy" json:"enableChunkStrategy"` WhereRange string `gorm:"type:varchar(120);comment:source sql query where" json:"whereRange"` SqlHintS string `gorm:"type:varchar(120);comment:source sql query hint" json:"sqlHintS"` *common.Entity }
type DataScanRule ¶
type DataScanRule struct { ID uint64 `gorm:"primary_key;autoIncrement;comment:id" json:"id"` TaskName string `gorm:"type:varchar(300);not null;uniqueIndex:uniq_schema_table_name;comment:migrate task datasource name" json:"taskName"` SchemaNameS string `gorm:"type:varchar(120);not null;uniqueIndex:uniq_schema_table_name;comment:source schema name" json:"schemaNameS"` TableNameS string `gorm:"type:varchar(120);not null;uniqueIndex:uniq_schema_table_name;comment:source table name" json:"tableNameS"` SqlHintS string `gorm:"type:varchar(120);comment:source sql query hint" json:"sqlHintS"` TableSamplerateS string `gorm:"type:varchar(120);comment:source table samplerate" json:"tableSamplerateS"` *common.Entity }
type IColumnRouteRule ¶
type IColumnRouteRule interface { CreateColumnRouteRule(ctx context.Context, rule *ColumnRouteRule) (*ColumnRouteRule, error) CreateInBatchColumnRouteRule(ctx context.Context, rule []*ColumnRouteRule, thread, batchSize int) ([]*ColumnRouteRule, error) UpdateColumnRouteRule(ctx context.Context, rule *ColumnRouteRule) (*ColumnRouteRule, error) GetColumnRouteRule(ctx context.Context, rule *ColumnRouteRule) (*ColumnRouteRule, error) ListColumnRouteRule(ctx context.Context, page uint64, pageSize uint64) ([]*ColumnRouteRule, error) DeleteColumnRouteRule(ctx context.Context, taskNames []string) error FindColumnRouteRule(ctx context.Context, rule *ColumnRouteRule) ([]*ColumnRouteRule, error) QueryColumnRouteRule(ctx context.Context, rule *ColumnRouteRule) ([]*ColumnRouteRule, error) }
type IDataCompareRule ¶
type IDataCompareRule interface { CreateDataCompareRule(ctx context.Context, rule *DataCompareRule) (*DataCompareRule, error) CreateInBatchDataCompareRule(ctx context.Context, rule []*DataCompareRule, thread, batchSize int) ([]*DataCompareRule, error) GetDataCompareRule(ctx context.Context, rule *DataCompareRule) (*DataCompareRule, error) DeleteDataCompareRule(ctx context.Context, taskNames []string) error FindDataCompareRule(ctx context.Context, rule *DataCompareRule) ([]*DataCompareRule, error) IsContainedDataCompareRuleRecord(ctx context.Context, rule *DataCompareRule) (bool, error) }
type IDataMigrateRule ¶
type IDataMigrateRule interface { CreateDataMigrateRule(ctx context.Context, rule *DataMigrateRule) (*DataMigrateRule, error) CreateInBatchDataMigrateRule(ctx context.Context, rule []*DataMigrateRule, thread, batchSize int) ([]*DataMigrateRule, error) GetDataMigrateRule(ctx context.Context, rule *DataMigrateRule) (*DataMigrateRule, error) DeleteDataMigrateRule(ctx context.Context, taskNames []string) error FindDataMigrateRule(ctx context.Context, rule *DataMigrateRule) ([]*DataMigrateRule, error) IsContainedDataMigrateRuleRecord(ctx context.Context, rule *DataMigrateRule) (bool, error) }
type IDataScanRule ¶
type IDataScanRule interface { CreateDataScanRule(ctx context.Context, rule *DataScanRule) (*DataScanRule, error) CreateInBatchDataScanRule(ctx context.Context, rule []*DataScanRule, thread, batchSize int) ([]*DataScanRule, error) GetDataScanRule(ctx context.Context, rule *DataScanRule) (*DataScanRule, error) DeleteDataScanRule(ctx context.Context, taskNames []string) error FindDataScanRule(ctx context.Context, rule *DataScanRule) ([]*DataScanRule, error) IsContainedDataScanRuleRecord(ctx context.Context, rule *DataScanRule) (bool, error) }
type IMigrateTaskSequence ¶ added in v0.0.9
type IMigrateTaskSequence interface { CreateMigrateTaskSequence(ctx context.Context, rule *MigrateTaskSequence) (*MigrateTaskSequence, error) UpdateMigrateTaskSequence(ctx context.Context, rule *MigrateTaskSequence) (*MigrateTaskSequence, error) GetMigrateTaskSequence(ctx context.Context, rule *MigrateTaskSequence) (*MigrateTaskSequence, error) ListMigrateTaskSequence(ctx context.Context, page uint64, pageSize uint64) ([]*MigrateTaskSequence, error) DeleteMigrateTaskSequence(ctx context.Context, taskNames []string) error DeleteMigrateTaskSequenceByTaskIsExclude(ctx context.Context, rule *MigrateTaskSequence) error FindMigrateTaskSequence(ctx context.Context, rule *MigrateTaskSequence) ([]*MigrateTaskSequence, error) }
type IMigrateTaskTable ¶
type IMigrateTaskTable interface { CreateMigrateTaskTable(ctx context.Context, rule *MigrateTaskTable) (*MigrateTaskTable, error) UpdateMigrateTaskTable(ctx context.Context, rule *MigrateTaskTable) (*MigrateTaskTable, error) GetMigrateTaskTable(ctx context.Context, rule *MigrateTaskTable) (*MigrateTaskTable, error) ListMigrateTaskTable(ctx context.Context, page uint64, pageSize uint64) ([]*MigrateTaskTable, error) DeleteMigrateTaskTable(ctx context.Context, taskNames []string) error DeleteMigrateTaskTableByTaskIsExclude(ctx context.Context, rule *MigrateTaskTable) error FindMigrateTaskTable(ctx context.Context, rule *MigrateTaskTable) ([]*MigrateTaskTable, error) }
type ISchemaRouteRule ¶
type ISchemaRouteRule interface { CreateSchemaRouteRule(ctx context.Context, rule *SchemaRouteRule) (*SchemaRouteRule, error) UpdateSchemaRouteRule(ctx context.Context, rule *SchemaRouteRule) (*SchemaRouteRule, error) GetSchemaRouteRule(ctx context.Context, rule *SchemaRouteRule) (*SchemaRouteRule, error) ListSchemaRouteRule(ctx context.Context, page uint64, pageSize uint64) ([]*SchemaRouteRule, error) DeleteSchemaRouteRule(ctx context.Context, taskNames []string) error }
type ISqlMigrateRule ¶
type ISqlMigrateRule interface { CreateSqlMigrateRule(ctx context.Context, rule *SqlMigrateRule) (*SqlMigrateRule, error) CreateInBatchSqlMigrateRule(ctx context.Context, rule []*SqlMigrateRule, thread, batchSize int) ([]*SqlMigrateRule, error) UpdateSqlMigrateRule(ctx context.Context, rule *SqlMigrateRule) (*SqlMigrateRule, error) GetSqlMigrateRule(ctx context.Context, rule *SqlMigrateRule) (*SqlMigrateRule, error) DeleteSqlMigrateRule(ctx context.Context, taskNames []string) error FindSqlMigrateRule(ctx context.Context, rule *SqlMigrateRule) ([]*SqlMigrateRule, error) FindSqlMigrateRuleGroupBySchemaTable(ctx context.Context) ([]*SqlMigrateRuleGroupSchemaTableTResult, error) }
type ITableRouteRule ¶
type ITableRouteRule interface { CreateTableRouteRule(ctx context.Context, rule *TableRouteRule) (*TableRouteRule, error) CreateInBatchTableRouteRule(ctx context.Context, rule []*TableRouteRule, thread, batchSize int) ([]*TableRouteRule, error) UpdateTableRouteRule(ctx context.Context, rule *TableRouteRule) (*TableRouteRule, error) GetTableRouteRule(ctx context.Context, rule *TableRouteRule) (*TableRouteRule, error) ListTableRouteRule(ctx context.Context, page uint64, pageSize uint64) ([]*TableRouteRule, error) DeleteTableRouteRule(ctx context.Context, taskNames []string) error FindTableRouteRule(ctx context.Context, rule *TableRouteRule) ([]*TableRouteRule, error) }
type MigrateTaskSequence ¶ added in v0.0.9
type MigrateTaskSequence struct { ID uint64 `gorm:"primary_key;autoIncrement;comment:id" json:"id"` TaskName string `gorm:"type:varchar(300);not null;uniqueIndex:uniq_schema_sequence_name;comment:migrate task name" json:"taskName"` SchemaNameS string `gorm:"type:varchar(120);not null;uniqueIndex:uniq_schema_sequence_name;comment:source schema name" json:"schemaNameS"` SequenceNameS string `` /* 128-byte string literal not displayed */ IsExclude string `gorm:"type:varchar(5);not null;comment:source schema table is whether exclude" json:"isExclude"` }
MigrateTaskSequence used for configure includeSequence and excludeSequence
type MigrateTaskTable ¶
type MigrateTaskTable struct { ID uint64 `gorm:"primary_key;autoIncrement;comment:id" json:"id"` TaskName string `gorm:"type:varchar(300);not null;uniqueIndex:uniq_schema_table_name;comment:migrate task name" json:"taskName"` SchemaNameS string `gorm:"type:varchar(120);not null;uniqueIndex:uniq_schema_table_name;comment:source schema name" json:"schemaNameS"` TableNameS string `gorm:"type:varchar(120);not null;uniqueIndex:uniq_schema_table_name;comment:source schema table list" json:"tableNameS"` IsExclude string `gorm:"type:varchar(5);not null;comment:source schema table is whether exclude" json:"isExclude"` }
MigrateTaskTable used for configure includeTable and excludeTable
type RWColumnRouteRule ¶
func NewColumnRouteRuleRW ¶
func NewColumnRouteRuleRW(db *gorm.DB) *RWColumnRouteRule
func (*RWColumnRouteRule) CreateColumnRouteRule ¶
func (rw *RWColumnRouteRule) CreateColumnRouteRule(ctx context.Context, rule *ColumnRouteRule) (*ColumnRouteRule, error)
func (*RWColumnRouteRule) CreateInBatchColumnRouteRule ¶
func (rw *RWColumnRouteRule) CreateInBatchColumnRouteRule(ctx context.Context, rule []*ColumnRouteRule, thread, batchSize int) ([]*ColumnRouteRule, error)
func (*RWColumnRouteRule) DeleteColumnRouteRule ¶
func (rw *RWColumnRouteRule) DeleteColumnRouteRule(ctx context.Context, taskNames []string) error
func (*RWColumnRouteRule) FindColumnRouteRule ¶
func (rw *RWColumnRouteRule) FindColumnRouteRule(ctx context.Context, rule *ColumnRouteRule) ([]*ColumnRouteRule, error)
func (*RWColumnRouteRule) GetColumnRouteRule ¶
func (rw *RWColumnRouteRule) GetColumnRouteRule(ctx context.Context, rule *ColumnRouteRule) (*ColumnRouteRule, error)
func (*RWColumnRouteRule) ListColumnRouteRule ¶
func (rw *RWColumnRouteRule) ListColumnRouteRule(ctx context.Context, page uint64, pageSize uint64) ([]*ColumnRouteRule, error)
func (*RWColumnRouteRule) QueryColumnRouteRule ¶ added in v0.0.17
func (rw *RWColumnRouteRule) QueryColumnRouteRule(ctx context.Context, rule *ColumnRouteRule) ([]*ColumnRouteRule, error)
func (*RWColumnRouteRule) TableName ¶
func (rw *RWColumnRouteRule) TableName(ctx context.Context) string
func (*RWColumnRouteRule) UpdateColumnRouteRule ¶
func (rw *RWColumnRouteRule) UpdateColumnRouteRule(ctx context.Context, rule *ColumnRouteRule) (*ColumnRouteRule, error)
type RWDataCompareRule ¶
func NewDataCompareRuleRW ¶
func NewDataCompareRuleRW(db *gorm.DB) *RWDataCompareRule
func (*RWDataCompareRule) CreateDataCompareRule ¶
func (rw *RWDataCompareRule) CreateDataCompareRule(ctx context.Context, rule *DataCompareRule) (*DataCompareRule, error)
func (*RWDataCompareRule) CreateInBatchDataCompareRule ¶
func (rw *RWDataCompareRule) CreateInBatchDataCompareRule(ctx context.Context, rule []*DataCompareRule, thread, batchSize int) ([]*DataCompareRule, error)
func (*RWDataCompareRule) DeleteDataCompareRule ¶
func (rw *RWDataCompareRule) DeleteDataCompareRule(ctx context.Context, taskNames []string) error
func (*RWDataCompareRule) FindDataCompareRule ¶
func (rw *RWDataCompareRule) FindDataCompareRule(ctx context.Context, rule *DataCompareRule) ([]*DataCompareRule, error)
func (*RWDataCompareRule) GetDataCompareRule ¶
func (rw *RWDataCompareRule) GetDataCompareRule(ctx context.Context, rule *DataCompareRule) (*DataCompareRule, error)
func (*RWDataCompareRule) IsContainedDataCompareRuleRecord ¶
func (rw *RWDataCompareRule) IsContainedDataCompareRuleRecord(ctx context.Context, rule *DataCompareRule) (bool, error)
func (*RWDataCompareRule) TableName ¶
func (rw *RWDataCompareRule) TableName(ctx context.Context) string
func (*RWDataCompareRule) UpdateDataCompareRule ¶
func (rw *RWDataCompareRule) UpdateDataCompareRule(ctx context.Context, rule *DataCompareRule) (*DataCompareRule, error)
type RWDataMigrateRule ¶
func NewDataMigrateRuleRW ¶
func NewDataMigrateRuleRW(db *gorm.DB) *RWDataMigrateRule
func (*RWDataMigrateRule) CreateDataMigrateRule ¶
func (rw *RWDataMigrateRule) CreateDataMigrateRule(ctx context.Context, rule *DataMigrateRule) (*DataMigrateRule, error)
func (*RWDataMigrateRule) CreateInBatchDataMigrateRule ¶
func (rw *RWDataMigrateRule) CreateInBatchDataMigrateRule(ctx context.Context, rule []*DataMigrateRule, thread, batchSize int) ([]*DataMigrateRule, error)
func (*RWDataMigrateRule) DeleteDataMigrateRule ¶
func (rw *RWDataMigrateRule) DeleteDataMigrateRule(ctx context.Context, taskNames []string) error
func (*RWDataMigrateRule) FindDataMigrateRule ¶
func (rw *RWDataMigrateRule) FindDataMigrateRule(ctx context.Context, rule *DataMigrateRule) ([]*DataMigrateRule, error)
func (*RWDataMigrateRule) GetDataMigrateRule ¶
func (rw *RWDataMigrateRule) GetDataMigrateRule(ctx context.Context, rule *DataMigrateRule) (*DataMigrateRule, error)
func (*RWDataMigrateRule) IsContainedDataMigrateRuleRecord ¶
func (rw *RWDataMigrateRule) IsContainedDataMigrateRuleRecord(ctx context.Context, rule *DataMigrateRule) (bool, error)
func (*RWDataMigrateRule) TableName ¶
func (rw *RWDataMigrateRule) TableName(ctx context.Context) string
func (*RWDataMigrateRule) UpdateDataMigrateRule ¶
func (rw *RWDataMigrateRule) UpdateDataMigrateRule(ctx context.Context, rule *DataMigrateRule) (*DataMigrateRule, error)
type RWDataScanRule ¶
func NewDataScanRuleRW ¶
func NewDataScanRuleRW(db *gorm.DB) *RWDataScanRule
func (*RWDataScanRule) CreateDataScanRule ¶
func (rw *RWDataScanRule) CreateDataScanRule(ctx context.Context, rule *DataScanRule) (*DataScanRule, error)
func (*RWDataScanRule) CreateInBatchDataScanRule ¶
func (rw *RWDataScanRule) CreateInBatchDataScanRule(ctx context.Context, rule []*DataScanRule, thread, batchSize int) ([]*DataScanRule, error)
func (*RWDataScanRule) DeleteDataScanRule ¶
func (rw *RWDataScanRule) DeleteDataScanRule(ctx context.Context, taskNames []string) error
func (*RWDataScanRule) FindDataScanRule ¶
func (rw *RWDataScanRule) FindDataScanRule(ctx context.Context, rule *DataScanRule) ([]*DataScanRule, error)
func (*RWDataScanRule) GetDataScanRule ¶
func (rw *RWDataScanRule) GetDataScanRule(ctx context.Context, rule *DataScanRule) (*DataScanRule, error)
func (*RWDataScanRule) IsContainedDataScanRuleRecord ¶
func (rw *RWDataScanRule) IsContainedDataScanRuleRecord(ctx context.Context, rule *DataScanRule) (bool, error)
func (*RWDataScanRule) UpdateDataScanRule ¶
func (rw *RWDataScanRule) UpdateDataScanRule(ctx context.Context, rule *DataScanRule) (*DataScanRule, error)
type RWMigrateTaskSequence ¶ added in v0.0.9
func NewMigrateTaskSequenceRW ¶ added in v0.0.9
func NewMigrateTaskSequenceRW(db *gorm.DB) *RWMigrateTaskSequence
func (*RWMigrateTaskSequence) CreateMigrateTaskSequence ¶ added in v0.0.9
func (rw *RWMigrateTaskSequence) CreateMigrateTaskSequence(ctx context.Context, rule *MigrateTaskSequence) (*MigrateTaskSequence, error)
func (*RWMigrateTaskSequence) DeleteMigrateTaskSequence ¶ added in v0.0.9
func (rw *RWMigrateTaskSequence) DeleteMigrateTaskSequence(ctx context.Context, taskName []string) error
func (*RWMigrateTaskSequence) DeleteMigrateTaskSequenceByTaskIsExclude ¶ added in v0.0.9
func (rw *RWMigrateTaskSequence) DeleteMigrateTaskSequenceByTaskIsExclude(ctx context.Context, rule *MigrateTaskSequence) error
func (*RWMigrateTaskSequence) FindMigrateTaskSequence ¶ added in v0.0.9
func (rw *RWMigrateTaskSequence) FindMigrateTaskSequence(ctx context.Context, rule *MigrateTaskSequence) ([]*MigrateTaskSequence, error)
func (*RWMigrateTaskSequence) GetMigrateTaskSequence ¶ added in v0.0.9
func (rw *RWMigrateTaskSequence) GetMigrateTaskSequence(ctx context.Context, rule *MigrateTaskSequence) (*MigrateTaskSequence, error)
func (*RWMigrateTaskSequence) ListMigrateTaskSequence ¶ added in v0.0.9
func (rw *RWMigrateTaskSequence) ListMigrateTaskSequence(ctx context.Context, page uint64, pageSize uint64) ([]*MigrateTaskSequence, error)
func (*RWMigrateTaskSequence) TableName ¶ added in v0.0.9
func (rw *RWMigrateTaskSequence) TableName(ctx context.Context) string
func (*RWMigrateTaskSequence) UpdateMigrateTaskSequence ¶ added in v0.0.9
func (rw *RWMigrateTaskSequence) UpdateMigrateTaskSequence(ctx context.Context, rule *MigrateTaskSequence) (*MigrateTaskSequence, error)
type RWMigrateTaskTable ¶
func NewMigrateTaskTableRW ¶
func NewMigrateTaskTableRW(db *gorm.DB) *RWMigrateTaskTable
func (*RWMigrateTaskTable) CreateMigrateTaskTable ¶
func (rw *RWMigrateTaskTable) CreateMigrateTaskTable(ctx context.Context, rule *MigrateTaskTable) (*MigrateTaskTable, error)
func (*RWMigrateTaskTable) DeleteMigrateTaskTable ¶
func (rw *RWMigrateTaskTable) DeleteMigrateTaskTable(ctx context.Context, taskName []string) error
func (*RWMigrateTaskTable) DeleteMigrateTaskTableByTaskIsExclude ¶
func (rw *RWMigrateTaskTable) DeleteMigrateTaskTableByTaskIsExclude(ctx context.Context, rule *MigrateTaskTable) error
func (*RWMigrateTaskTable) FindMigrateTaskTable ¶
func (rw *RWMigrateTaskTable) FindMigrateTaskTable(ctx context.Context, rule *MigrateTaskTable) ([]*MigrateTaskTable, error)
func (*RWMigrateTaskTable) GetMigrateTaskTable ¶
func (rw *RWMigrateTaskTable) GetMigrateTaskTable(ctx context.Context, rule *MigrateTaskTable) (*MigrateTaskTable, error)
func (*RWMigrateTaskTable) ListMigrateTaskTable ¶
func (rw *RWMigrateTaskTable) ListMigrateTaskTable(ctx context.Context, page uint64, pageSize uint64) ([]*MigrateTaskTable, error)
func (*RWMigrateTaskTable) TableName ¶
func (rw *RWMigrateTaskTable) TableName(ctx context.Context) string
func (*RWMigrateTaskTable) UpdateMigrateTaskTable ¶
func (rw *RWMigrateTaskTable) UpdateMigrateTaskTable(ctx context.Context, rule *MigrateTaskTable) (*MigrateTaskTable, error)
type RWSchemaRouteRule ¶
func NewSchemaRouteRuleRW ¶
func NewSchemaRouteRuleRW(db *gorm.DB) *RWSchemaRouteRule
func (*RWSchemaRouteRule) CreateSchemaRouteRule ¶
func (rw *RWSchemaRouteRule) CreateSchemaRouteRule(ctx context.Context, rule *SchemaRouteRule) (*SchemaRouteRule, error)
func (*RWSchemaRouteRule) DeleteSchemaRouteRule ¶
func (rw *RWSchemaRouteRule) DeleteSchemaRouteRule(ctx context.Context, taskName []string) error
func (*RWSchemaRouteRule) GetSchemaRouteRule ¶
func (rw *RWSchemaRouteRule) GetSchemaRouteRule(ctx context.Context, rule *SchemaRouteRule) (*SchemaRouteRule, error)
func (*RWSchemaRouteRule) ListSchemaRouteRule ¶
func (rw *RWSchemaRouteRule) ListSchemaRouteRule(ctx context.Context, page uint64, pageSize uint64) ([]*SchemaRouteRule, error)
func (*RWSchemaRouteRule) TableName ¶
func (rw *RWSchemaRouteRule) TableName(ctx context.Context) string
func (*RWSchemaRouteRule) UpdateSchemaRouteRule ¶
func (rw *RWSchemaRouteRule) UpdateSchemaRouteRule(ctx context.Context, rule *SchemaRouteRule) (*SchemaRouteRule, error)
type RWSqlMigrateRule ¶
func NewSqlMigrateRuleRW ¶
func NewSqlMigrateRuleRW(db *gorm.DB) *RWSqlMigrateRule
func (*RWSqlMigrateRule) CreateInBatchSqlMigrateRule ¶
func (rw *RWSqlMigrateRule) CreateInBatchSqlMigrateRule(ctx context.Context, rule []*SqlMigrateRule, thread, batchSize int) ([]*SqlMigrateRule, error)
func (*RWSqlMigrateRule) CreateSqlMigrateRule ¶
func (rw *RWSqlMigrateRule) CreateSqlMigrateRule(ctx context.Context, rule *SqlMigrateRule) (*SqlMigrateRule, error)
func (*RWSqlMigrateRule) DeleteSqlMigrateRule ¶
func (rw *RWSqlMigrateRule) DeleteSqlMigrateRule(ctx context.Context, taskNames []string) error
func (*RWSqlMigrateRule) FindSqlMigrateRule ¶
func (rw *RWSqlMigrateRule) FindSqlMigrateRule(ctx context.Context, rule *SqlMigrateRule) ([]*SqlMigrateRule, error)
func (*RWSqlMigrateRule) FindSqlMigrateRuleGroupBySchemaTable ¶
func (rw *RWSqlMigrateRule) FindSqlMigrateRuleGroupBySchemaTable(ctx context.Context) ([]*SqlMigrateRuleGroupSchemaTableTResult, error)
func (*RWSqlMigrateRule) GetSqlMigrateRule ¶
func (rw *RWSqlMigrateRule) GetSqlMigrateRule(ctx context.Context, rule *SqlMigrateRule) (*SqlMigrateRule, error)
func (*RWSqlMigrateRule) TableName ¶
func (rw *RWSqlMigrateRule) TableName(ctx context.Context) string
func (*RWSqlMigrateRule) UpdateSqlMigrateRule ¶
func (rw *RWSqlMigrateRule) UpdateSqlMigrateRule(ctx context.Context, rule *SqlMigrateRule) (*SqlMigrateRule, error)
type RWTableRouteRule ¶
func NewTableRouteRuleRW ¶
func NewTableRouteRuleRW(db *gorm.DB) *RWTableRouteRule
func (*RWTableRouteRule) CreateInBatchTableRouteRule ¶
func (rw *RWTableRouteRule) CreateInBatchTableRouteRule(ctx context.Context, rule []*TableRouteRule, thread, batchSize int) ([]*TableRouteRule, error)
func (*RWTableRouteRule) CreateTableRouteRule ¶
func (rw *RWTableRouteRule) CreateTableRouteRule(ctx context.Context, rule *TableRouteRule) (*TableRouteRule, error)
func (*RWTableRouteRule) DeleteTableRouteRule ¶
func (rw *RWTableRouteRule) DeleteTableRouteRule(ctx context.Context, taskNames []string) error
func (*RWTableRouteRule) FindTableRouteRule ¶
func (rw *RWTableRouteRule) FindTableRouteRule(ctx context.Context, rule *TableRouteRule) ([]*TableRouteRule, error)
func (*RWTableRouteRule) GetTableRouteRule ¶
func (rw *RWTableRouteRule) GetTableRouteRule(ctx context.Context, rule *TableRouteRule) (*TableRouteRule, error)
func (*RWTableRouteRule) ListTableRouteRule ¶
func (rw *RWTableRouteRule) ListTableRouteRule(ctx context.Context, page uint64, pageSize uint64) ([]*TableRouteRule, error)
func (*RWTableRouteRule) TableName ¶
func (rw *RWTableRouteRule) TableName(ctx context.Context) string
func (*RWTableRouteRule) UpdateTableRouteRule ¶
func (rw *RWTableRouteRule) UpdateTableRouteRule(ctx context.Context, rule *TableRouteRule) (*TableRouteRule, error)
type SchemaRouteRule ¶
type SchemaRouteRule struct { ID uint64 `gorm:"primary_key;autoIncrement;comment:id" json:"id"` TaskName string `gorm:"type:varchar(300);not null;uniqueIndex:uniq_schema_table_name;comment:migrate task name" json:"taskName"` SchemaNameS string `gorm:"type:varchar(120);not null;comment:source schema name" json:"schemaNameS"` SchemaNameT string `gorm:"type:varchar(120);not null;comment:target schema name" json:"schemaNameT"` //IncludeTable string `gorm:"comment:source schema include table list" json:"includeTable"` // used for task record //ExcludeTable string `gorm:"comment:source schema exclude table list" json:"excludeTable"` // used for task record *common.Entity }
type SqlMigrateRule ¶
type SqlMigrateRule struct { ID uint64 `gorm:"primary_key;autoIncrement;comment:id" json:"id"` TaskName string `gorm:"type:varchar(300);not null;uniqueIndex:uniq_schema_table_name;comment:migrate task datasource name" json:"taskName"` SchemaNameT string `gorm:"type:varchar(120);not null;uniqueIndex:uniq_schema_table_name;comment:target schema name" json:"schemaNameT"` TableNameT string `gorm:"type:varchar(120);not null;uniqueIndex:uniq_schema_table_name;comment:target table name" json:"tableNameT"` SqlHintT string `gorm:"type:varchar(120);comment:target sql hint" json:"sqlHintT"` SqlQueryS string `gorm:"type:varchar(300);not null;comment:migrate task sql query" json:"sqlQueryS"` ColumnRouteRule string `gorm:"type:longtext;comment:schema table column route rules" json:"columnRouteRule"` *common.Entity }
type TableRouteRule ¶
type TableRouteRule struct { ID uint64 `gorm:"primary_key;autoIncrement;comment:id" json:"id"` TaskName string `gorm:"type:varchar(300);not null;uniqueIndex:uniq_schema_table_name;comment:migrate task name" json:"taskName"` SchemaNameS string `gorm:"type:varchar(120);not null;uniqueIndex:uniq_schema_table_name;comment:source schema name" json:"schemaNameS"` TableNameS string `gorm:"type:varchar(120);not null;uniqueIndex:uniq_schema_table_name;comment:source table name" json:"tableNameS"` SchemaNameT string `gorm:"type:varchar(120);not null;comment:target schema name" json:"schemaNameT"` TableNameT string `gorm:"type:varchar(120);not null;comment:target table name" json:"tableNameT"` *common.Entity }