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 impliec. 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.
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 PreTableStructCheck(ctx context.Context, cfg *config.Config, metaDB *meta.Meta, exporters []string) error
- type Chunk
- type Compare
- type DBSummary
- type Report
- func (r *Report) CheckMySQLRows(mysqlQuery string) (int64, error)
- func (r *Report) CheckOracleRows(oracleQuery string) (int64, error)
- func (r *Report) GenDBQuery() (oracleQuery string, mysqlQuery string)
- func (r *Report) Report() (string, error)
- func (r *Report) ReportCheckCRC32() (string, error)
- func (r *Report) ReportCheckRows() (string, error)
- func (r *Report) String() string
- type Task
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Chunk ¶
type Chunk struct { Ctx context.Context `json:"-"` ChunkID int `json:"chunk_id"` SourceGlobalSCN uint64 `json:"source_global_scn"` SourceTable string `json:"source_table"` TargetTable string `json:"target_table"` IsPartition string `json:"is_partition"` SourceColumnInfo string `json:"source_column_info"` TargetColumnInfo string `json:"target_column_info"` WhereColumn string `json:"where_column"` WhereRange string `json:"where_range"` // chunk split need Cfg *config.Config `json:"-"` Oracle *oracle.Oracle `json:"-"` MySQL *mysql.MySQL `json:"-"` MetaDB *meta.Meta `json:"-"` }
Chunk 数据对比
func (*Chunk) CustomTableConfig ¶
type Compare ¶
type Compare struct {
// contains filtered or unexported fields
}
func (*Compare) AdjustCompareConfig ¶
func (*Compare) NewCompare ¶
type Report ¶
type Report struct { DataCompareMeta meta.DataCompareMeta `json:"data_compare_meta"` Mysql *mysql.MySQL `json:"-"` Oracle *oracle.Oracle `json:"-"` OnlyCheckRows bool `json:"only_check_rows"` }
func (*Report) CheckOracleRows ¶
func (*Report) GenDBQuery ¶
func (*Report) ReportCheckCRC32 ¶
func (*Report) ReportCheckRows ¶
type Task ¶
type Task struct {
// contains filtered or unexported fields
}
func NewPartCompareTableTask ¶
func NewWaitCompareTableTask ¶
func (*Task) AdjustDBSelectColumn ¶
字段查询以 ORACLE 字段为主 Date/Timestamp 字段类型格式化 Interval Year/Day 数据字符 TO_CHAR 格式化
func (*Task) FilterDBWhereColumn ¶
筛选 NUMBER 字段以及判断表是否存在主键/唯一键/唯一索引 第一优先级配置文件指定字段【忽略是否存在索引】 第二优先级任意取某个主键/唯一索引 NUMBER 字段 第三优先级取某个唯一性 DISTINCT 高的索引 NUMBER 字段 如果表没有索引 NUMBER 字段或者没有 NUMBER 字段则报错