taskflow

package
v0.0.0-beta.2 Latest Latest
Warning

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

Go to latest
Published: Jun 7, 2024 License: Apache-2.0 Imports: 37 Imported by: 0

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.

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.

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.

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.

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.

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.

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.

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.

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.

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.

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.

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.

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.

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.

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.

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.

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.

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.

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.

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.

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.

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.

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.

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.

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.

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.

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.

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.

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.

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.

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

Constants

This section is empty.

Variables

This section is empty.

Functions

func AssessDatabaseColumnNameLengthCheck

func AssessDatabaseColumnNameLengthCheck(databaseS database.IDatabase, schemaNames []string, limit int) ([]SchemaTableColumnNameLengthCheck, ReportSummary, error)

func AssessDatabaseIndexNameLengthCheck

func AssessDatabaseIndexNameLengthCheck(databaseS database.IDatabase, schemaNames []string, limit int) ([]SchemaTableIndexNameLengthCheck, ReportSummary, error)

func AssessDatabaseMaxActiveSessionCount

func AssessDatabaseMaxActiveSessionCount(databaseS database.IDatabase, schemaNames []string) ([]SchemaActiveSession, ReportSummary, error)

func AssessDatabaseOverview

func AssessDatabaseOverview(databaseS database.IDatabase, objAssessCompsMap map[string]buildin.BuildinCompatibleRule, reportName, reportUser string) (*ReportOverview, ReportSummary, error)

func AssessDatabasePartitionTableCountsCheck

func AssessDatabasePartitionTableCountsCheck(databaseS database.IDatabase, schemaNames []string, limit int) ([]SchemaPartitionTableCountsCheck, ReportSummary, error)

Oracle Database Check

func AssessDatabaseSchemaCodeOverview

func AssessDatabaseSchemaCodeOverview(databaseS database.IDatabase, schemaNames []string) ([]SchemaCodeObject, ReportSummary, error)

func AssessDatabaseSchemaColumnTypeCompatible

func AssessDatabaseSchemaColumnTypeCompatible(databaseS database.IDatabase, schemaNames []string, buildinDatatypeMap map[string]buildin.BuildinDatatypeRule) ([]SchemaColumnTypeCompatibles, ReportSummary, error)

func AssessDatabaseSchemaConstraintTypeCompatible

func AssessDatabaseSchemaConstraintTypeCompatible(databaseS database.IDatabase, schemaNames []string, objAssessCompsMap map[string]buildin.BuildinCompatibleRule) ([]SchemaConstraintTypeCompatibles, ReportSummary, error)

func AssessDatabaseSchemaDefaultValue

func AssessDatabaseSchemaDefaultValue(databaseS database.IDatabase, schemaNames []string, defaultValueMap map[string]buildin.BuildinDefaultvalRule) ([]SchemaDefaultValueCompatibles, ReportSummary, error)

func AssessDatabaseSchemaIndexTypeCompatible

func AssessDatabaseSchemaIndexTypeCompatible(databaseS database.IDatabase, schemaNames []string, objAssessCompsMap map[string]buildin.BuildinCompatibleRule) ([]SchemaIndexTypeCompatibles, ReportSummary, error)

func AssessDatabaseSchemaMaterializedViewOverview

func AssessDatabaseSchemaMaterializedViewOverview(databaseS database.IDatabase, schemaNames []string) ([]SchemaMaterializedViewObject, ReportSummary, error)

func AssessDatabaseSchemaObjectTypeCompatible

func AssessDatabaseSchemaObjectTypeCompatible(databaseS database.IDatabase, schemaNames []string, objAssessCompsMap map[string]buildin.BuildinCompatibleRule) ([]SchemaObjectTypeCompatibles, ReportSummary, error)

func AssessDatabaseSchemaOverview

func AssessDatabaseSchemaOverview(databaseS database.IDatabase, schemaNames []string) ([]SchemaTableSizeData, ReportSummary, error)

Oracle Database Reference

func AssessDatabaseSchemaPartitionTypeCompatible

func AssessDatabaseSchemaPartitionTypeCompatible(databaseS database.IDatabase, schemaNames []string, objAssessCompsMap map[string]buildin.BuildinCompatibleRule) ([]SchemaPartitionTypeCompatibles, ReportSummary, error)

func AssessDatabaseSchemaSubPartitionTypeCompatible

func AssessDatabaseSchemaSubPartitionTypeCompatible(databaseS database.IDatabase, schemaNames []string, objAssessCompsMap map[string]buildin.BuildinCompatibleRule) ([]SchemaSubPartitionTypeCompatibles, ReportSummary, error)

func AssessDatabaseSchemaSynonymOverview

func AssessDatabaseSchemaSynonymOverview(databaseS database.IDatabase, schemaNames []string) ([]SchemaSynonymObject, ReportSummary, error)

func AssessDatabaseSchemaTableAvgRowLengthTOP

func AssessDatabaseSchemaTableAvgRowLengthTOP(databaseS database.IDatabase, schemaNames []string, top int) ([]SchemaTableAvgRowLengthTOP, ReportSummary, error)

func AssessDatabaseSchemaTableNumberTypeEqualZero

func AssessDatabaseSchemaTableNumberTypeEqualZero(databaseS database.IDatabase, schemaNames []string, specifyDatatype string) ([]SchemaTableNumberTypeEqualZero, ReportSummary, error)

func AssessDatabaseSchemaTableRowsTOP

func AssessDatabaseSchemaTableRowsTOP(databaseS database.IDatabase, schemaNames []string, top int) ([]SchemaTableRowsTOP, ReportSummary, error)

func AssessDatabaseSchemaTableTypeCompatible

func AssessDatabaseSchemaTableTypeCompatible(databaseS database.IDatabase, schemaNames []string, objAssessCompsMap map[string]buildin.BuildinCompatibleRule) ([]SchemaTableTypeCompatibles, ReportSummary, error)

func AssessDatabaseSchemaTemporaryTableCompatible

func AssessDatabaseSchemaTemporaryTableCompatible(databaseS database.IDatabase, schemaNames []string, objAssessCompsMap map[string]buildin.BuildinCompatibleRule) ([]SchemaTemporaryTableTypeCompatibles, ReportSummary, error)

func AssessDatabaseSchemaViewTypeCompatible

func AssessDatabaseSchemaViewTypeCompatible(databaseS database.IDatabase, schemaNames []string, objAssessCompsMap map[string]buildin.BuildinCompatibleRule) ([]SchemaViewTypeCompatibles, ReportSummary, error)

func AssessDatabaseSequenceNameLengthCheck

func AssessDatabaseSequenceNameLengthCheck(databaseS database.IDatabase, schemaNames []string, limit int) ([]SchemaSequenceNameLengthCheck, ReportSummary, error)

func AssessDatabaseTableColumnCountsCheck

func AssessDatabaseTableColumnCountsCheck(databaseS database.IDatabase, schemaNames []string, limit int) ([]SchemaTableColumnCountsCheck, ReportSummary, error)

func AssessDatabaseTableIndexCountsCheck

func AssessDatabaseTableIndexCountsCheck(databaseS database.IDatabase, schemaNames []string, limit int) ([]SchemaTableIndexCountsCheck, ReportSummary, error)

func AssessDatabaseTableIndexRowLengthCheck

func AssessDatabaseTableIndexRowLengthCheck(databaseS database.IDatabase, schemaNames []string, limit int) ([]SchemaTableIndexRowLengthCheck, ReportSummary, error)

func AssessDatabaseTableNameLengthCheck

func AssessDatabaseTableNameLengthCheck(databaseS database.IDatabase, schemaNames []string, limit int) ([]SchemaTableNameLengthCheck, ReportSummary, error)

func AssessDatabaseTableRowLengthMBCheck

func AssessDatabaseTableRowLengthMBCheck(databaseS database.IDatabase, schemaNames []string, limitMB int) ([]SchemaTableRowLengthCheck, ReportSummary, error)

func AssessDatabaseUsernameLengthCheck

func AssessDatabaseUsernameLengthCheck(databaseS database.IDatabase, schemaNames []string, limit int) ([]UsernameLengthCheck, ReportSummary, error)

func AssessDatabaseViewNameLengthCheck

func AssessDatabaseViewNameLengthCheck(databaseS database.IDatabase, schemaNames []string, limit int) ([]SchemaViewNameLengthCheck, ReportSummary, error)

func Cmp

func Cmp(src map[string]int64, dest map[string]int64) (map[string]int64, map[string]int64)

Cmp used for the src and dest store key-value pair , and key data row and value data row counts

func GenMYSQLCompatibleDatabaseDeleteStmtSQL

func GenMYSQLCompatibleDatabaseDeleteStmtSQL(targetSchemaName, targetTableName, sqlHintT string, columnDetailT []string, columnDataT []string, columnDataCounts int) string

func GenMYSQLCompatibleDatabaseInsertStmtSQL

func GenMYSQLCompatibleDatabaseInsertStmtSQL(targetSchemaName, targetTableName, sqlHintT string, columnDetailT []string, columnDataT string, columnDataCounts int, safeMode bool) string

func GenMYSQLCompatibleDatabasePrepareStmt

func GenMYSQLCompatibleDatabasePrepareStmt(
	targetSchemaName, targetTableName string, sqlHintT, columnDetailT string, insertBatchSize int, safeMode bool) string

func GenNewHTMLReport

func GenNewHTMLReport(report *Report, file *os.File) error

func GetAssessDatabaseCheckResult

func GetAssessDatabaseCheckResult(databaseS database.IDatabase, schemaNames []string) (*ReportCheck, *ReportSummary, error)

func GetAssessDatabaseCompatibleResult

func GetAssessDatabaseCompatibleResult(databaseS database.IDatabase, schemaNames []string, objAssessCompsMap map[string]buildin.BuildinCompatibleRule, buildDatatypeMap map[string]buildin.BuildinDatatypeRule, defaultValuesMap map[string]buildin.BuildinDefaultvalRule) (*ReportCompatible, *ReportSummary, error)

func GetAssessDatabaseOverviewResult

func GetAssessDatabaseOverviewResult(databaseS database.IDatabase, objAssessCompsMap map[string]buildin.BuildinCompatibleRule, reportUser, reportName string) (*ReportOverview, ReportSummary, error)

func GetAssessDatabaseRelatedResult

func GetAssessDatabaseRelatedResult(databaseS database.IDatabase, schemaNames []string) (*ReportRelated, *ReportSummary, error)

Types

type AssessMigrateFile

type AssessMigrateFile struct {
	Ctx        context.Context `json:"-"`
	Mutex      *sync.Mutex     `json:"-"`
	CompFile   *os.File        `json:"-"`
	CompWriter *bufio.Writer   `json:"-"`
	TaskName   string          `json:"taskName"`
	TaskFlow   string          `json:"taskFlow"`
	OutputDir  string          `json:"outputDir"`
}

func NewAssessMigrateFile

func NewAssessMigrateFile(ctx context.Context,
	taskName, taskFlow, outputDir string) *AssessMigrateFile

func (*AssessMigrateFile) Close

func (s *AssessMigrateFile) Close() error

func (*AssessMigrateFile) InitFile

func (s *AssessMigrateFile) InitFile() error

func (*AssessMigrateFile) SyncFile

func (s *AssessMigrateFile) SyncFile() error

type AssessMigrateTask

type AssessMigrateTask struct {
	Ctx         context.Context
	Task        *task.Task
	DatasourceS *datasource.Datasource
	DatasourceT *datasource.Datasource
	TaskParams  *pb.AssessMigrateParam
	DBTypeS     string
	DBTypeT     string
}

func (*AssessMigrateTask) InitAssessMigrateTask

func (amt *AssessMigrateTask) InitAssessMigrateTask() error

func (*AssessMigrateTask) Start

func (amt *AssessMigrateTask) Start() error

type CsvMigrateRow

type CsvMigrateRow struct {
	Ctx        context.Context
	TaskMode   string
	TaskFlow   string
	BufioSize  int
	Dmt        *task.DataMigrateTask
	DatabaseS  database.IDatabase
	DBCharsetS string
	DBCharsetT string
	TaskParams *pb.CsvMigrateParam
	ReadChan   chan []string
	WriteChan  chan string
}

func (*CsvMigrateRow) MigrateApply

func (r *CsvMigrateRow) MigrateApply() error

func (*CsvMigrateRow) MigrateProcess

func (r *CsvMigrateRow) MigrateProcess() error

func (*CsvMigrateRow) MigrateRead

func (r *CsvMigrateRow) MigrateRead() error

type CsvMigrateTask

type CsvMigrateTask struct {
	Ctx         context.Context
	Task        *task.Task
	DatasourceS *datasource.Datasource
	DatasourceT *datasource.Datasource
	TaskParams  *pb.CsvMigrateParam
}

func (*CsvMigrateTask) InitCsvMigrateTask

func (cmt *CsvMigrateTask) InitCsvMigrateTask(databaseS database.IDatabase, dbVersion string, dbCollationS bool, schemaRoute *rule.SchemaRouteRule) error

func (*CsvMigrateTask) Start

func (cmt *CsvMigrateTask) Start() error

type DataCompareFile

type DataCompareFile struct {
	Ctx        context.Context `json:"-"`
	Mutex      *sync.Mutex     `json:"-"`
	CompFile   *os.File        `json:"-"`
	CompWriter *bufio.Writer   `json:"-"`
	TaskName   string          `json:"taskName"`
	TaskFlow   string          `json:"taskFlow"`
	OutputDir  string          `json:"outputDir"`
}

func NewDataCompareFile

func NewDataCompareFile(ctx context.Context,
	taskName, taskFlow, outputDir string) *DataCompareFile

func (*DataCompareFile) Close

func (s *DataCompareFile) Close() error

func (*DataCompareFile) InitFile

func (s *DataCompareFile) InitFile() error

func (*DataCompareFile) SyncFile

func (s *DataCompareFile) SyncFile() error

type DataCompareRow

type DataCompareRow struct {
	Ctx         context.Context
	StartTime   time.Time
	TaskMode    string
	TaskFlow    string
	Dmt         *task.DataCompareTask
	DatabaseS   database.IDatabase
	DatabaseT   database.IDatabase
	CallTimeout int
	DBCharsetS  string
	DBCharsetT  string
}

func (*DataCompareRow) CompareCRC32

func (r *DataCompareRow) CompareCRC32() error

func (*DataCompareRow) CompareMD5

func (r *DataCompareRow) CompareMD5() error

func (*DataCompareRow) CompareMethod

func (r *DataCompareRow) CompareMethod() string

func (*DataCompareRow) CompareRows

func (r *DataCompareRow) CompareRows() error

type DataCompareRule

type DataCompareRule struct {
	Ctx            context.Context    `json:"-"`
	TaskName       string             `json:"taskName"`
	TaskMode       string             `json:"taskMode"`
	TaskFlow       string             `json:"taskFlow"`
	SchemaNameS    string             `json:"schemaNameS"`
	TableNameS     string             `json:"tableNameS"`
	GlobalSqlHintS string             `json:"globalSqlHintS"`
	TableTypeS     map[string]string  `json:"tableTypeS"`
	IgnoreFields   []string           `json:"ignoreFields"`
	OnlyCompareRow bool               `json:"onlyCompareRow"`
	OnlyCompareCRC bool               `json:"onlyCompareCRC"`
	DatabaseS      database.IDatabase `json:"databaseS"`
	DBCharsetS     string             `json:"DBCharsetS"`
	DBCharsetT     string             `json:"DBCharsetT"`
	DBCollationS   bool               `json:"DBCollationS"`
	CaseFieldRuleS string             `json:"caseFieldRuleS"`
	CaseFieldRuleT string             `json:"caseFieldRuleT"`
}

func (*DataCompareRule) GenSchemaNameRule

func (r *DataCompareRule) GenSchemaNameRule() (string, string, error)

func (*DataCompareRule) GenSchemaTableColumnRule

func (r *DataCompareRule) GenSchemaTableColumnRule() (string, string, string, string, error)

func (*DataCompareRule) GenSchemaTableCompareMethodRule

func (r *DataCompareRule) GenSchemaTableCompareMethodRule() string

func (*DataCompareRule) GenSchemaTableCustomRule

func (r *DataCompareRule) GenSchemaTableCustomRule() (string, string, error)

func (*DataCompareRule) GenSchemaTableNameRule

func (r *DataCompareRule) GenSchemaTableNameRule() (string, string, error)

func (*DataCompareRule) GenSchemaTableTypeRule

func (r *DataCompareRule) GenSchemaTableTypeRule() string

type DataCompareTask

type DataCompareTask struct {
	Ctx         context.Context
	Task        *task.Task
	DatasourceS *datasource.Datasource
	DatasourceT *datasource.Datasource
	TaskParams  *pb.DataCompareParam
}

func (*DataCompareTask) InitDataCompareTask

func (dmt *DataCompareTask) InitDataCompareTask(databaseS, databaseT database.IDatabase, dbCollationS bool, schemaRoute *rule.SchemaRouteRule) error

func (*DataCompareTask) Start

func (dmt *DataCompareTask) Start() error

type DataMigrateRule

type DataMigrateRule struct {
	Ctx            context.Context    `json:"-"`
	TaskName       string             `json:"taskName"`
	TaskMode       string             `json:"taskMode"`
	TaskFlow       string             `json:"taskFlow"`
	SchemaNameS    string             `json:"schemaNameS"`
	TableNameS     string             `json:"tableNameS"`
	GlobalSqlHintS string             `json:"globalSqlHintS"`
	TableTypeS     map[string]string  `json:"tableTypeS"`
	DatabaseS      database.IDatabase `json:"databaseS"`
	DBCharsetS     string             `json:"DBCharsetS"`
	DBCollationS   bool               `json:"DBCollationS"`
	CaseFieldRuleS string             `json:"caseFieldRuleS"`
	CaseFieldRuleT string             `json:"caseFieldRuleT"`
}

func (*DataMigrateRule) GenSchemaNameRule

func (r *DataMigrateRule) GenSchemaNameRule() (string, string, error)

func (*DataMigrateRule) GenSchemaTableColumnRule

func (r *DataMigrateRule) GenSchemaTableColumnRule() (string, string, string, string, error)

func (*DataMigrateRule) GenSchemaTableCustomRule

func (r *DataMigrateRule) GenSchemaTableCustomRule() (bool, string, string, error)

func (*DataMigrateRule) GenSchemaTableNameRule

func (r *DataMigrateRule) GenSchemaTableNameRule() (string, string, error)

func (*DataMigrateRule) GenSchemaTableTypeRule

func (r *DataMigrateRule) GenSchemaTableTypeRule() string

type DataScanFile

type DataScanFile struct {
	Ctx        context.Context `json:"-"`
	Mutex      *sync.Mutex     `json:"-"`
	CompFile   *os.File        `json:"-"`
	CompWriter *bufio.Writer   `json:"-"`
	TaskName   string          `json:"taskName"`
	TaskFlow   string          `json:"taskFlow"`
	OutputDir  string          `json:"outputDir"`
}

func NewDataScanFile

func NewDataScanFile(ctx context.Context,
	taskName, taskFlow, outputDir string) *DataScanFile

func (*DataScanFile) Close

func (s *DataScanFile) Close() error

func (*DataScanFile) InitFile

func (s *DataScanFile) InitFile() error

func (*DataScanFile) SyncFile

func (s *DataScanFile) SyncFile() error

type DataScanRow

type DataScanRow struct {
	Ctx        context.Context
	StartTime  time.Time
	TaskName   string
	TaskMode   string
	TaskFlow   string
	Dst        *task.DataScanTask
	DatabaseS  database.IDatabase
	DBCharsetS string
}

func (*DataScanRow) ScanRows

func (r *DataScanRow) ScanRows() error

type DataScanRule

type DataScanRule struct {
	Ctx               context.Context    `json:"-"`
	TaskName          string             `json:"taskName"`
	TaskMode          string             `json:"taskMode"`
	TaskFlow          string             `json:"taskFlow"`
	SchemaNameS       string             `json:"schemaNameS"`
	TableNameS        string             `json:"tableNameS"`
	GlobalSamplerateS string             `json:"globalSamplerateS"`
	GlobalSqlHintS    string             `json:"globalSqlHintS"`
	TableTypeS        map[string]string  `json:"tableTypeS"`
	DBCollationS      bool               `json:"DBCollationS"`
	DatabaseS         database.IDatabase `json:"-"`
	DBCharsetS        string             `json:"DBCharsetS"`
}

func (*DataScanRule) GenSchemaNameRule

func (r *DataScanRule) GenSchemaNameRule() (string, error)

func (*DataScanRule) GenSchemaTableCustomRule

func (r *DataScanRule) GenSchemaTableCustomRule() (string, string, error)

func (*DataScanRule) GenSchemaTableTypeRule

func (r *DataScanRule) GenSchemaTableTypeRule() string

func (*DataScanRule) GenTableColumnNameRule

func (r *DataScanRule) GenTableColumnNameRule() (string, string, error)

func (*DataScanRule) GenTableNameRule

func (r *DataScanRule) GenTableNameRule() (string, error)

type DataScanTask

type DataScanTask struct {
	Ctx         context.Context
	Task        *task.Task
	DatasourceS *datasource.Datasource
	DatasourceT *datasource.Datasource
	TaskParams  *pb.DataScanParam
}

func (*DataScanTask) Start

func (dst *DataScanTask) Start() error

type Datasource

type Datasource struct {
	DatabaseS   database.IDatabase `json:"-"`
	SchemaNameS string             `json:"schemaNameS"`
	TableNameS  string             `json:"tableNameS"`
	TableTypeS  string             `json:"tableTypeS"`
	CollationS  bool               `json:"collationS"`
}

func (*Datasource) GetTableCharsetCollation

func (d *Datasource) GetTableCharsetCollation() (string, string, error)

func (*Datasource) GetTableCheckKey

func (d *Datasource) GetTableCheckKey() ([]map[string]string, error)

func (*Datasource) GetTableColumnComment

func (d *Datasource) GetTableColumnComment() ([]map[string]string, error)

func (*Datasource) GetTableColumns

func (d *Datasource) GetTableColumns() ([]map[string]string, error)

func (*Datasource) GetTableComment

func (d *Datasource) GetTableComment() ([]map[string]string, error)

func (*Datasource) GetTableForeignKey

func (d *Datasource) GetTableForeignKey() ([]map[string]string, error)

func (*Datasource) GetTableNormalIndex

func (d *Datasource) GetTableNormalIndex() ([]map[string]string, error)

func (*Datasource) GetTableOriginStruct

func (d *Datasource) GetTableOriginStruct() (string, error)

func (*Datasource) GetTablePrimaryKey

func (d *Datasource) GetTablePrimaryKey() ([]map[string]string, error)

func (*Datasource) GetTableUniqueIndex

func (d *Datasource) GetTableUniqueIndex() ([]map[string]string, error)

func (*Datasource) GetTableUniqueKey

func (d *Datasource) GetTableUniqueKey() ([]map[string]string, error)

func (*Datasource) String

func (d *Datasource) String() string

type Report

func (*Report) String

func (r *Report) String() string

type ReportCheck

type ReportCheck struct {
	ListSchemaPartitionTableCountsCheck  []SchemaPartitionTableCountsCheck  `json:"list_schema_partition_table_counts_check"`
	ListSchemaTableRowLengthCheck        []SchemaTableRowLengthCheck        `json:"list_schema_table_row_length_check"`
	ListSchemaTableIndexRowLengthCheck   []SchemaTableIndexRowLengthCheck   `json:"list_schema_table_index_row_length_check"`
	ListSchemaTableColumnCountsCheck     []SchemaTableColumnCountsCheck     `json:"list_schema_table_column_counts_check"`
	ListSchemaIndexCountsCheck           []SchemaTableIndexCountsCheck      `json:"list_schema_index_counts_check"`
	ListUsernameLengthCheck              []UsernameLengthCheck              `json:"list_username_length_check"`
	ListSchemaTableNameLengthCheck       []SchemaTableNameLengthCheck       `json:"list_schema_table_name_length_check"`
	ListSchemaTableColumnNameLengthCheck []SchemaTableColumnNameLengthCheck `json:"list_schema_table_column_name_length_check"`
	ListSchemaTableIndexNameLengthCheck  []SchemaTableIndexNameLengthCheck  `json:"list_schema_table_index_name_length_check"`
	ListSchemaViewNameLengthCheck        []SchemaViewNameLengthCheck        `json:"list_schema_view_name_length_check"`
	ListSchemaSequenceNameLengthCheck    []SchemaSequenceNameLengthCheck    `json:"list_schema_sequence_name_length_check"`
}

func (*ReportCheck) String

func (rc *ReportCheck) String() string

type ReportCompatible

type ReportCompatible struct {
	ListSchemaTableTypeCompatibles          []SchemaTableTypeCompatibles          `json:"list_schema_table_type_compatibles"`
	ListSchemaColumnTypeCompatibles         []SchemaColumnTypeCompatibles         `json:"list_schema_column_type_compatibles"`
	ListSchemaConstraintTypeCompatibles     []SchemaConstraintTypeCompatibles     `json:"list_schema_constraint_type_compatibles"`
	ListSchemaIndexTypeCompatibles          []SchemaIndexTypeCompatibles          `json:"list_schema_index_type_compatibles"`
	ListSchemaDefaultValueCompatibles       []SchemaDefaultValueCompatibles       `json:"list_schema_default_value_compatibles"`
	ListSchemaViewTypeCompatibles           []SchemaViewTypeCompatibles           `json:"list_schema_view_type_compatibles"`
	ListSchemaObjectTypeCompatibles         []SchemaObjectTypeCompatibles         `json:"list_schema_object_type_compatibles"`
	ListSchemaPartitionTypeCompatibles      []SchemaPartitionTypeCompatibles      `json:"list_schema_partition_type_compatibles"`
	ListSchemaSubPartitionTypeCompatibles   []SchemaSubPartitionTypeCompatibles   `json:"list_schema_sub_partition_type_compatibles"`
	ListSchemaTemporaryTableTypeCompatibles []SchemaTemporaryTableTypeCompatibles `json:"list_schema_temporary_table_type_compatibles"`
}

func (*ReportCompatible) String

func (sc *ReportCompatible) String() string

type ReportOverview

type ReportOverview struct {
	ReportName        string `json:"report_name"`
	ReportUser        string `json:"report_user"`
	HostName          string `json:"host_name"`
	PlatformName      string `json:"platform_name"`
	DBName            string `json:"db_name"`
	DBVersion         string `json:"db_version"`
	GlobalDBName      string `json:"global_db_name"`
	ClusterDB         string `json:"cluster_db"`
	ClusterDBInstance string `json:"cluster_db_instance"`
	InstanceName      string `json:"instance_name"`
	InstanceNumber    string `json:"instance_number"`
	ThreadNumber      string `json:"thread_number"`
	BlockSize         string `json:"block_size"`
	TotalUsedSize     string `json:"total_used_size"`
	HostCPUS          string `json:"host_cpus"`
	HostMem           string `json:"host_mem"`
	CharacterSet      string `json:"character_set"`
}

func (*ReportOverview) String

func (ro *ReportOverview) String() string

type ReportRelated

type ReportRelated struct {
	ListSchemaActiveSession            []SchemaActiveSession            `json:"list_schema_active_session"`
	ListSchemaTableSizeData            []SchemaTableSizeData            `json:"list_schema_table_size_data"`
	ListSchemaTableRowsTOP             []SchemaTableRowsTOP             `json:"list_schema_table_rows_top"`
	ListSchemaCodeObject               []SchemaCodeObject               `json:"list_schema_code_object"`
	ListSchemaSynonymObject            []SchemaSynonymObject            `json:"list_schema_synonym_object"`
	ListSchemaMaterializedViewObject   []SchemaMaterializedViewObject   `json:"list_schema_materialized_view_object"`
	ListSchemaTableAvgRowLengthTOP     []SchemaTableAvgRowLengthTOP     `json:"list_schema_table_avg_row_length_top"`
	ListSchemaTableNumberTypeEqualZero []SchemaTableNumberTypeEqualZero `json:"list_schema_table_number_type_equal_zero"`
}

func (*ReportRelated) String

func (rr *ReportRelated) String() string

type ReportSummary

type ReportSummary struct {
	AssessType    string `json:"assess_type"`
	AssessName    string `json:"assess_name"`
	AssessTotal   int    `json:"assess_total"`
	Compatible    int    `json:"compatible"`
	Incompatible  int    `json:"incompatible"`
	Convertible   int    `json:"convertible"`
	InConvertible int    `json:"inconvertible"`
}

func (*ReportSummary) String

func (ro *ReportSummary) String() string

type ScanResultMYSQLCompatible

type ScanResultMYSQLCompatible struct {
	ColumnName     string
	Bigint         string
	BigintUnsigned string
	DecimalInt     string
	DecimalPoint   string
	Unknown        string
}

type SchemaActiveSession

type SchemaActiveSession struct {
	Rownum         string `json:"rownum"`
	DBID           string `json:"dbid"`
	InstanceNumber string `json:"instance_number"`
	SampleID       string `json:"sample_id"`
	SampleTime     string `json:"sample_time"`
	SessionCounts  string `json:"session_counts"`
}

func (*SchemaActiveSession) String

func (ro *SchemaActiveSession) String() string

type SchemaCodeObject

type SchemaCodeObject struct {
	Schema     string `json:"schema"`
	ObjectName string `json:"object_name"`
	ObjectType string `json:"object_type"`
	Lines      string `json:"lines"`
}

func (*SchemaCodeObject) String

func (ro *SchemaCodeObject) String() string

type SchemaColumnTypeCompatibles

type SchemaColumnTypeCompatibles struct {
	Schema        string `json:"schema"`
	ColumnType    string `json:"column_type"`
	ObjectCounts  string `json:"object_counts"`
	MaxDataLength string `json:"max_data_length"`
	ColumnTypeMap string `json:"column_type_map"`
	IsEquivalent  string `json:"is_equivalent"`
}

func (*SchemaColumnTypeCompatibles) String

func (sc *SchemaColumnTypeCompatibles) String() string

type SchemaConstraintTypeCompatibles

type SchemaConstraintTypeCompatibles struct {
	Schema         string `json:"schema"`
	ConstraintType string `json:"constraint_type"`
	ObjectCounts   string `json:"object_counts"`
	IsCompatible   string `json:"is_compatible"`
	IsConvertible  string `json:"is_convertible"`
}

func (*SchemaConstraintTypeCompatibles) String

type SchemaDefaultValueCompatibles

type SchemaDefaultValueCompatibles struct {
	Schema             string `json:"schema"`
	ColumnDefaultValue string `json:"column_default_value"`
	ObjectCounts       string `json:"object_counts"`
	DefaultValueMap    string `json:"default_value_map"`
	IsCompatible       string `json:"is_compatible"`
	IsConvertible      string `json:"is_convertible"`
}

func (*SchemaDefaultValueCompatibles) String

type SchemaIndexTypeCompatibles

type SchemaIndexTypeCompatibles struct {
	Schema        string `json:"schema"`
	IndexType     string `json:"index_type"`
	ObjectCounts  string `json:"object_counts"`
	IsCompatible  string `json:"is_compatible"`
	IsConvertible string `json:"is_convertible"`
}

func (*SchemaIndexTypeCompatibles) String

func (sc *SchemaIndexTypeCompatibles) String() string

type SchemaMaterializedViewObject

type SchemaMaterializedViewObject struct {
	Schema            string `json:"schema"`
	MviewName         string `json:"mview_name"`
	RewriteCapability string `json:"rewrite_capability"`
	RefreshMode       string `json:"refresh_mode"`
	RefreshMethod     string `json:"refresh_method"`
	FastRefreshable   string `json:"fast_refreshable"`
}

func (*SchemaMaterializedViewObject) String

func (ro *SchemaMaterializedViewObject) String() string

type SchemaObjectTypeCompatibles

type SchemaObjectTypeCompatibles struct {
	Schema        string `json:"schema"`
	ObjectType    string `json:"object_type"`
	ObjectCounts  string `json:"object_counts"`
	IsCompatible  string `json:"is_compatible"`
	IsConvertible string `json:"is_convertible"`
}

func (*SchemaObjectTypeCompatibles) String

func (sc *SchemaObjectTypeCompatibles) String() string

type SchemaPartitionTableCountsCheck

type SchemaPartitionTableCountsCheck struct {
	Schema          string `json:"schema"`
	TableName       string `json:"table_name"`
	PartitionCounts string `json:"partition_counts"`
}

func (*SchemaPartitionTableCountsCheck) String

type SchemaPartitionTypeCompatibles

type SchemaPartitionTypeCompatibles struct {
	Schema        string `json:"schema"`
	PartitionType string `json:"partition_type"`
	ObjectCounts  string `json:"object_counts"`
	IsCompatible  string `json:"is_compatible"`
	IsConvertible string `json:"is_convertible"`
}

func (*SchemaPartitionTypeCompatibles) String

type SchemaSequenceNameLengthCheck

type SchemaSequenceNameLengthCheck struct {
	Schema       string `json:"schema"`
	SequenceName string `json:"sequence_name"`
	OrderFlag    string `json:"order_flag"`
	Length       string `json:"length"`
}

func (*SchemaSequenceNameLengthCheck) String

type SchemaSubPartitionTypeCompatibles

type SchemaSubPartitionTypeCompatibles struct {
	Schema           string `json:"schema"`
	SubPartitionType string `json:"sub_partition_type"`
	ObjectCounts     string `json:"object_counts"`
	IsCompatible     string `json:"is_compatible"`
	IsConvertible    string `json:"is_convertible"`
}

func (*SchemaSubPartitionTypeCompatibles) String

type SchemaSynonymObject

type SchemaSynonymObject struct {
	Schema      string `json:"schema"`
	SynonymName string `json:"synonym_name"`
	TableOwner  string `json:"table_owner"`
	TableName   string `json:"table_name"`
}

func (*SchemaSynonymObject) String

func (ro *SchemaSynonymObject) String() string

type SchemaTableAvgRowLengthTOP

type SchemaTableAvgRowLengthTOP struct {
	Schema       string `json:"schema"`
	TableName    string `json:"table_name"`
	AvgRowLength string `json:"avg_row_length"`
}

func (*SchemaTableAvgRowLengthTOP) String

func (ro *SchemaTableAvgRowLengthTOP) String() string

type SchemaTableColumnCountsCheck

type SchemaTableColumnCountsCheck struct {
	Schema       string `json:"schema"`
	TableName    string `json:"table_name"`
	ColumnCounts string `json:"column_counts"`
}

func (*SchemaTableColumnCountsCheck) String

func (ro *SchemaTableColumnCountsCheck) String() string

type SchemaTableColumnNameLengthCheck

type SchemaTableColumnNameLengthCheck struct {
	Schema     string `json:"schema"`
	TableName  string `json:"table_name"`
	ColumnName string `json:"column_name"`
	Length     string `json:"length"`
}

func (*SchemaTableColumnNameLengthCheck) String

type SchemaTableIndexCountsCheck

type SchemaTableIndexCountsCheck struct {
	Schema      string `json:"schema"`
	TableName   string `json:"table_name"`
	IndexCounts string `json:"index_counts"`
}

func (*SchemaTableIndexCountsCheck) String

func (ro *SchemaTableIndexCountsCheck) String() string

type SchemaTableIndexNameLengthCheck

type SchemaTableIndexNameLengthCheck struct {
	Schema    string `json:"schema"`
	TableName string `json:"table_name"`
	IndexName string `json:"index_name"`
	Length    string `json:"length"`
}

func (*SchemaTableIndexNameLengthCheck) String

type SchemaTableIndexRowLengthCheck

type SchemaTableIndexRowLengthCheck struct {
	Schema       string `json:"schema"`
	TableName    string `json:"table_name"`
	IndexName    string `json:"index_name"`
	ColumnLength string `json:"column_length"`
}

func (*SchemaTableIndexRowLengthCheck) String

type SchemaTableNameLengthCheck

type SchemaTableNameLengthCheck struct {
	Schema    string `json:"schema"`
	TableName string `json:"table_name"`
	Length    string `json:"length"`
}

func (*SchemaTableNameLengthCheck) String

func (ro *SchemaTableNameLengthCheck) String() string

type SchemaTableNumberTypeEqualZero

type SchemaTableNumberTypeEqualZero struct {
	Schema        string `json:"schema"`
	TableName     string `json:"table_name"`
	ColumnName    string `json:"column_name"`
	DataPrecision string `json:"data_precision"`
	DataScale     string `json:"data_scale"`
}

func (*SchemaTableNumberTypeEqualZero) String

type SchemaTableRowLengthCheck

type SchemaTableRowLengthCheck struct {
	Schema       string `json:"schema"`
	TableName    string `json:"table_name"`
	AvgRowLength string `json:"avg_row_length"`
}

func (*SchemaTableRowLengthCheck) String

func (ro *SchemaTableRowLengthCheck) String() string

type SchemaTableRowsTOP

type SchemaTableRowsTOP struct {
	Schema    string `json:"schema"`
	TableName string `json:"table_name"`
	TableType string `json:"table_type"`
	TableSize string `json:"table_size"`
}

func (*SchemaTableRowsTOP) String

func (ro *SchemaTableRowsTOP) String() string

type SchemaTableSizeData

type SchemaTableSizeData struct {
	Schema        string `json:"schema"`
	TableSize     string `json:"table_size"`
	IndexSize     string `json:"index_size"`
	LobTableSize  string `json:"lob_table_size"`
	LobIndexSize  string `json:"lob_index_size"`
	AllTablesRows string `json:"all_tables_rows"`
}

func (*SchemaTableSizeData) String

func (ro *SchemaTableSizeData) String() string

type SchemaTableTypeCompatibles

type SchemaTableTypeCompatibles struct {
	Schema        string `json:"schema"`
	TableType     string `json:"table_type"`
	ObjectCounts  string `json:"object_counts"`
	ObjectSize    string `json:"object_size"`
	IsCompatible  string `json:"is_compatible"`
	IsConvertible string `json:"is_convertible"`
}

func (*SchemaTableTypeCompatibles) String

func (sc *SchemaTableTypeCompatibles) String() string

type SchemaTemporaryTableTypeCompatibles

type SchemaTemporaryTableTypeCompatibles struct {
	Schema             string `json:"schema"`
	TemporaryTableType string `json:"temporary_table_type"`
	ObjectCounts       string `json:"object_counts"`
	IsCompatible       string `json:"is_compatible"`
	IsConvertible      string `json:"is_convertible"`
}

func (*SchemaTemporaryTableTypeCompatibles) String

type SchemaViewNameLengthCheck

type SchemaViewNameLengthCheck struct {
	Schema   string `json:"schema"`
	ViewName string `json:"view_name"`
	ReadOnly string `json:"read_only"`
	Length   string `json:"length"`
}

func (*SchemaViewNameLengthCheck) String

func (ro *SchemaViewNameLengthCheck) String() string

type SchemaViewTypeCompatibles

type SchemaViewTypeCompatibles struct {
	Schema        string `json:"schema"`
	ViewType      string `json:"view_type"`
	ViewTypeOwner string `json:"view_type_owner"`
	ObjectCounts  string `json:"object_counts"`
	IsCompatible  string `json:"is_compatible"`
	IsConvertible string `json:"is_convertible"`
}

func (*SchemaViewTypeCompatibles) String

func (sc *SchemaViewTypeCompatibles) String() string

type SequenceMigrateDatabase

type SequenceMigrateDatabase struct {
	Ctx           context.Context    `json:"-"`
	TaskName      string             `json:"taskName"`
	TaskFlow      string             `json:"taskFlow"`
	SchemaNameS   string             `json:"schemaNameS"`
	SchemaNameT   string             `json:"schemaNameT"`
	TaskStartTime time.Time          `json:"-"`
	DatasourceT   database.IDatabase `json:"-"`
	Sequences     []string           `json:"sequences"`
}

func NewSequenceMigrateDatabase

func NewSequenceMigrateDatabase(ctx context.Context,
	taskName, taskFlow, schemaNameS, schemaNameT string, datasourceT database.IDatabase,
	taskStartTime time.Time, seqs []string) *SequenceMigrateDatabase

func (*SequenceMigrateDatabase) GenSequenceDigest

func (s *SequenceMigrateDatabase) GenSequenceDigest() (string, error)

func (*SequenceMigrateDatabase) SyncSequenceDatabase

func (s *SequenceMigrateDatabase) SyncSequenceDatabase() error

func (*SequenceMigrateDatabase) WriteSequenceDatabase

func (s *SequenceMigrateDatabase) WriteSequenceDatabase() error

type SqlMigrateRow

type SqlMigrateRow struct {
	Ctx           context.Context
	TaskMode      string
	TaskFlow      string
	Smt           *task.SqlMigrateTask
	DatabaseS     database.IDatabase
	DatabaseT     database.IDatabase
	DatabaseTStmt *sql.Stmt
	DBCharsetS    string
	DBCharsetT    string
	SqlThreadT    int
	BatchSize     int
	CallTimeout   int
	SafeMode      bool
	ReadChan      chan []interface{}
	WriteChan     chan []interface{}
}

func (*SqlMigrateRow) MigrateApply

func (r *SqlMigrateRow) MigrateApply() error

func (*SqlMigrateRow) MigrateProcess

func (r *SqlMigrateRow) MigrateProcess() error

func (*SqlMigrateRow) MigrateRead

func (r *SqlMigrateRow) MigrateRead() error

type SqlMigrateRule

type SqlMigrateRule struct {
	Ctx             context.Context    `json:"-"`
	TaskName        string             `json:"taskName"`
	TaskMode        string             `json:"taskMode"`
	TaskFlow        string             `json:"taskFlow"`
	SchemaNameT     string             `json:"schemaNameT"`
	TableNameT      string             `json:"tableNameT"`
	SqlHintT        string             `json:"sqlHintT"`
	GlobalSqlHintT  string             `json:"globalSqlHintT"`
	DatabaseS       database.IDatabase `json:"databaseS"`
	DBCharsetS      string             `json:"DBCharsetS"`
	SqlQueryS       string             `json:"sqlQueryS"`
	ColumnRouteRule map[string]string  `json:"columnRouteRule"`
	CaseFieldRuleS  string             `json:"caseFieldRuleS"`
	CaseFieldRuleT  string             `json:"caseFieldRuleT"`
}

func (*SqlMigrateRule) GenSqlMigrateSchemaNameRule

func (r *SqlMigrateRule) GenSqlMigrateSchemaNameRule() (string, error)

func (*SqlMigrateRule) GenSqlMigrateTableColumnRule

func (r *SqlMigrateRule) GenSqlMigrateTableColumnRule() (string, string, string, error)

func (*SqlMigrateRule) GenSqlMigrateTableCustomRule

func (r *SqlMigrateRule) GenSqlMigrateTableCustomRule() (string, string)

func (*SqlMigrateRule) GenSqlMigrateTableNameRule

func (r *SqlMigrateRule) GenSqlMigrateTableNameRule() (string, error)

type SqlMigrateTask

type SqlMigrateTask struct {
	Ctx         context.Context
	Task        *task.Task
	DatasourceS *datasource.Datasource
	DatasourceT *datasource.Datasource
	TaskParams  *pb.SqlMigrateParam
}

func (*SqlMigrateTask) InitSqlMigrateTask

func (smt *SqlMigrateTask) InitSqlMigrateTask(databaseS database.IDatabase) error

func (*SqlMigrateTask) Start

func (smt *SqlMigrateTask) Start() error

type StmtMigrateRow

type StmtMigrateRow struct {
	Ctx           context.Context
	TaskMode      string
	TaskFlow      string
	Dmt           *task.DataMigrateTask
	DatabaseS     database.IDatabase
	DatabaseT     database.IDatabase
	DatabaseTStmt *sql.Stmt
	DBCharsetS    string
	DBCharsetT    string
	SqlThreadT    int
	BatchSize     int
	CallTimeout   int
	SafeMode      bool
	ReadChan      chan []interface{}
	WriteChan     chan []interface{}
}

func (*StmtMigrateRow) MigrateApply

func (r *StmtMigrateRow) MigrateApply() error

func (*StmtMigrateRow) MigrateProcess

func (r *StmtMigrateRow) MigrateProcess() error

func (*StmtMigrateRow) MigrateRead

func (r *StmtMigrateRow) MigrateRead() error

type StmtMigrateTask

type StmtMigrateTask struct {
	Ctx         context.Context
	Task        *task.Task
	DatasourceS *datasource.Datasource
	DatasourceT *datasource.Datasource
	TaskParams  *pb.StatementMigrateParam
}

func (*StmtMigrateTask) Start

func (stm *StmtMigrateTask) Start() error

type StructCompareFile

type StructCompareFile struct {
	Ctx        context.Context `json:"-"`
	Mutex      *sync.Mutex     `json:"-"`
	CompFile   *os.File        `json:"-"`
	CompWriter *bufio.Writer   `json:"-"`
	TaskName   string          `json:"taskName"`
	TaskFlow   string          `json:"taskFlow"`
	OutputDir  string          `json:"outputDir"`
}

func NewStructCompareFile

func NewStructCompareFile(ctx context.Context,
	taskName, taskFlow, outputDir string) *StructCompareFile

func (*StructCompareFile) Close

func (s *StructCompareFile) Close() error

func (*StructCompareFile) InitFile

func (s *StructCompareFile) InitFile() error

func (*StructCompareFile) SyncFile

func (s *StructCompareFile) SyncFile() error

type StructCompareTask

type StructCompareTask struct {
	Ctx         context.Context
	Task        *task.Task
	DatasourceS *datasource.Datasource
	DatasourceT *datasource.Datasource
	TaskParams  *pb.StructCompareParam
}

func (*StructCompareTask) Start

func (dmt *StructCompareTask) Start() error

type StructMigrateDatabase

type StructMigrateDatabase struct {
	Ctx           context.Context       `json:"-"`
	TaskName      string                `json:"taskName"`
	TaskFlow      string                `json:"taskFlow"`
	TaskStartTime time.Time             `json:"-"`
	DatasourceT   database.IDatabase    `json:"-"`
	TableStruct   *database.TableStruct `json:"tableStruct"`
}

func NewStructMigrateDatabase

func NewStructMigrateDatabase(ctx context.Context,
	taskName, taskFlow string, datasourceT database.IDatabase,
	taskStartTime time.Time, tableStruct *database.TableStruct) *StructMigrateDatabase

func (*StructMigrateDatabase) GenTableStructDDL

func (s *StructMigrateDatabase) GenTableStructDDL() ([]string, []string, error)

func (*StructMigrateDatabase) GenTableStructDigest

func (s *StructMigrateDatabase) GenTableStructDigest() (string, string, string, error)

func (*StructMigrateDatabase) SyncStructDatabase

func (s *StructMigrateDatabase) SyncStructDatabase() error

func (*StructMigrateDatabase) WriteStructDatabase

func (s *StructMigrateDatabase) WriteStructDatabase() error

WriteStructDatabase used for sync file, current only write database, but not sync target database

type StructMigrateFile

type StructMigrateFile struct {
	Ctx              context.Context `json:"-"`
	Mutex            *sync.Mutex     `json:"-"`
	CompFile         *os.File        `json:"-"`
	InCompFile       *os.File        `json:"-"`
	CompWriter       *bufio.Writer   `json:"-"`
	InCompWriter     *bufio.Writer   `json:"-"`
	TaskName         string          `json:"taskName"`
	TaskFlow         string          `json:"taskFlow"`
	DBCharsetS       string          `json:"dbCharsetS"`
	DBCollationS     bool            `json:"dbCollationS"`
	SchemaCollationS string          `json:"schemaCollationS"`
	DBNlsComp        string          `json:"DBNlsComp"`
	SchemaNameS      string          `json:"schemaNameS"`
	SchemaNameT      string          `json:"schemaNameT"`
	OutputDir        string          `json:"outputDir"`
}

func NewStructMigrateFile

func NewStructMigrateFile(ctx context.Context,
	taskName, taskFlow, schemaNameS string, outputDir string) *StructMigrateFile

func (*StructMigrateFile) Close

func (s *StructMigrateFile) Close() error

func (*StructMigrateFile) InitOutputFile

func (s *StructMigrateFile) InitOutputFile() error

func (*StructMigrateFile) SyncSequenceFile

func (s *StructMigrateFile) SyncSequenceFile() error

func (*StructMigrateFile) SyncStructFile

func (s *StructMigrateFile) SyncStructFile() error

type StructMigrateRule

type StructMigrateRule struct {
	Ctx                      context.Context                  `json:"-"`
	TaskName                 string                           `json:"taskName"`
	TaskMode                 string                           `json:"taskMode"`
	TaskFlow                 string                           `json:"taskFlow"`
	SchemaNameS              string                           `json:"schemaNameS"`
	TableNameS               string                           `json:"tableNameS"`
	TablePrimaryAttrs        []map[string]string              `json:"tablePrimaryAttrs"`
	TableColumnsAttrs        []map[string]string              `json:"tableColumnsAttrs"`
	TableCommentAttrs        []map[string]string              `json:"tableCommentAttrs"`
	CaseFieldRuleT           string                           `json:"caseFieldRuleT"`
	CreateIfNotExist         bool                             `json:"createIfNotExist"`
	DBCollationS             bool                             `json:"DBCollationS"`
	DBCharsetS               string                           `json:"dbCharsetS"`
	DBCharsetT               string                           `json:"dbCharsetT"`
	BuildinDatatypeRules     []*buildin.BuildinDatatypeRule   `json:"-"`
	BuildinDefaultValueRules []*buildin.BuildinDefaultvalRule `json:"-"`
}

func (*StructMigrateRule) GetCaseFieldRule

func (r *StructMigrateRule) GetCaseFieldRule() string

func (*StructMigrateRule) GetCreatePrefixRule

func (r *StructMigrateRule) GetCreatePrefixRule() string

func (*StructMigrateRule) GetSchemaNameRule

func (r *StructMigrateRule) GetSchemaNameRule() (map[string]string, error)

func (*StructMigrateRule) GetTableAttributesRule

func (r *StructMigrateRule) GetTableAttributesRule() (string, error)

func (*StructMigrateRule) GetTableColumnCollationRule

func (r *StructMigrateRule) GetTableColumnCollationRule() (map[string]string, error)

func (*StructMigrateRule) GetTableColumnCommentRule

func (r *StructMigrateRule) GetTableColumnCommentRule() (map[string]string, error)

func (*StructMigrateRule) GetTableColumnRule

func (r *StructMigrateRule) GetTableColumnRule() (map[string]string, map[string]string, map[string]string, error)

GetTableColumnRule used for get custom table column rule column datatype rule priority: - column level - table level - task level - default level

func (*StructMigrateRule) GetTableCommentRule

func (r *StructMigrateRule) GetTableCommentRule() (string, error)

func (*StructMigrateRule) GetTableNameRule

func (r *StructMigrateRule) GetTableNameRule() (map[string]string, error)

func (*StructMigrateRule) String

func (r *StructMigrateRule) String() string

type StructMigrateTable

type StructMigrateTable struct {
	TaskName            string                                `json:"taskName"`
	TaskFlow            string                                `json:"taskFlow"`
	DatasourceS         *Datasource                           `json:"datasourceS"`
	TableAttributes     *database.StructMigrateAttributes     `json:"tableAttributes"`
	TableAttributesRule *database.StructMigrateAttributesRule `json:"tableAttributesRule"`
	DBCharsetT          string                                `json:"DBCharsetT"`
}

func (*StructMigrateTable) GenSchemaNameS

func (t *StructMigrateTable) GenSchemaNameS() string

func (*StructMigrateTable) GenSchemaNameT

func (t *StructMigrateTable) GenSchemaNameT() (string, error)

func (*StructMigrateTable) GenTableCheckKey

func (t *StructMigrateTable) GenTableCheckKey() ([]string, error)

func (*StructMigrateTable) GenTableColumnComment

func (t *StructMigrateTable) GenTableColumnComment() ([]string, error)

func (*StructMigrateTable) GenTableColumns

func (t *StructMigrateTable) GenTableColumns() ([]string, error)

func (*StructMigrateTable) GenTableComment

func (t *StructMigrateTable) GenTableComment() (string, error)

func (*StructMigrateTable) GenTableCreatePrefixT

func (t *StructMigrateTable) GenTableCreatePrefixT() string

func (*StructMigrateTable) GenTableForeignKey

func (t *StructMigrateTable) GenTableForeignKey() ([]string, error)

func (*StructMigrateTable) GenTableNameS

func (t *StructMigrateTable) GenTableNameS() string

func (*StructMigrateTable) GenTableNameT

func (t *StructMigrateTable) GenTableNameT() (string, error)

func (*StructMigrateTable) GenTableNormalIndex

func (t *StructMigrateTable) GenTableNormalIndex() ([]string, []string, error)

func (*StructMigrateTable) GenTableOriginDDlS

func (t *StructMigrateTable) GenTableOriginDDlS() string

func (*StructMigrateTable) GenTablePrimaryKey

func (t *StructMigrateTable) GenTablePrimaryKey() (string, error)

func (*StructMigrateTable) GenTableSuffix

func (t *StructMigrateTable) GenTableSuffix() (string, error)

func (*StructMigrateTable) GenTableTypeS

func (t *StructMigrateTable) GenTableTypeS() string

func (*StructMigrateTable) GenTableUniqueIndex

func (t *StructMigrateTable) GenTableUniqueIndex() ([]string, []string, error)

func (*StructMigrateTable) GenTableUniqueKey

func (t *StructMigrateTable) GenTableUniqueKey() ([]string, error)

func (*StructMigrateTable) String

func (t *StructMigrateTable) String() string

type StructMigrateTask

type StructMigrateTask struct {
	Ctx         context.Context
	Task        *task.Task
	SchemaNameS string
	SchemaNameT string
	DatabaseS   database.IDatabase
	DatabaseT   database.IDatabase
	DBCharsetS  string
	DBCharsetT  string
	TaskParams  *pb.StructMigrateParam
}

func (*StructMigrateTask) Start

func (st *StructMigrateTask) Start() error

type UsernameLengthCheck

type UsernameLengthCheck struct {
	Schema        string `json:"schema"`
	AccountStatus string `json:"account_status"`
	Created       string `json:"created"`
	Length        string `json:"length"`
}

func (*UsernameLengthCheck) String

func (ro *UsernameLengthCheck) String() string

Jump to

Keyboard shortcuts

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