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.
Index ¶
- func AdjustTableSelectColumn(e *service.Engine, schemaName, tableName string, ...) ([]string, string, string, error)
- func FilterOracleNUMBERColumn(e *service.Engine, schemaName, tableName, indexFiledName string, ...) (string, error)
- func OracleDiffMySQLTable(engine *service.Engine, cfg *config.CfgFile) error
- func PreDiffCheck(exporterTableSlice []string, cfg *config.CfgFile, engine *service.Engine) error
- func Report(targetSchema string, dm service.DataDiffMeta, engine *service.Engine, ...) error
- func StartTableDiff(partSyncTableInfo, waitSyncTableInfo []string, cfg *config.CfgFile, ...) error
- type DBSummary
- type Diff
- type ReportSummary
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AdjustTableSelectColumn ¶
func AdjustTableSelectColumn(e *service.Engine, schemaName, tableName string, sourceCharacterSet, nlsComp string, sourceTableCollation string, sourceSchemaCollation string, oracleCollation bool, onlyCheckRows bool) ([]string, string, string, error)
字段查询以 ORACLE 字段为主 Date/Timestamp 字段类型格式化 Interval Year/Day 数据字符 TO_CHAR 格式化
func FilterOracleNUMBERColumn ¶
func FilterOracleNUMBERColumn(e *service.Engine, schemaName, tableName, indexFiledName string, numberCols []string, onlyCheckRows bool) (string, error)
筛选 NUMBER 字段以及判断表是否存在主键/唯一键/唯一索引 第一优先级配置文件指定字段【忽略是否存在索引】 第二优先级任意取某个主键/唯一索引 NUMBER 字段 第三优先级取某个唯一性 DISTINCT 高的索引 NUMBER 字段 如果表没有索引 NUMBER 字段或者没有 NUMBER 字段则报错
func OracleDiffMySQLTable ¶
func PreDiffCheck ¶
func Report ¶
func Report(targetSchema string, dm service.DataDiffMeta, engine *service.Engine, reportRes chan<- ReportSummary, onlyCheckRows bool) error
Types ¶
type Diff ¶
type Diff struct {
ChunkSize int
DiffThreads int
OnlyCheckRows bool
IgnoreStructCheck bool
SourceSchema string
SourceTable string
IndexFields string
Range string
SourceCharacterSet, NlsComp string
SourceTableCollation string
SourceSchemaCollation string
OracleCollation bool
InsertBatchSize int
SyncMode string
Engine *service.Engine `json:"-"`
}
Diff 数据对比