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.
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 OracleTableMapRuleCheck(sourceSchema, targetSchema, tableName, columnName string, ...) (string, table.Row, error)
- func OracleTableToMySQLMappingCheck(engine *service.Engine, cfg *service.CfgFile) error
- type Column
- type ColumnInfo
- type ConstraintCheck
- type ConstraintForeign
- type ConstraintPUKey
- type DiffWriter
- type Index
- type IndexInfo
- type Partition
- type Table
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func OracleTableMapRuleCheck ¶
Types ¶
type ColumnInfo ¶
type ConstraintCheck ¶
type ConstraintCheck struct {
ConstraintExpression string
}
type ConstraintForeign ¶
type ConstraintPUKey ¶
type DiffWriter ¶
type DiffWriter struct {
SourceSchemaName string
TargetSchemaName string
TableName string
Engine *service.Engine
ChkFileMW *reverser.FileMW
RevFileMW *reverser.FileMW
CompFileMW *reverser.FileMW
}
func NewDiffWriter ¶
func (*DiffWriter) DiffOracleAndMySQLTable ¶
func (d *DiffWriter) DiffOracleAndMySQLTable() error
表结构对比 以上游 oracle 表结构信息为基准,对比下游 MySQL 表结构 1、若上游存在,下游不存在,则输出记录,若上游不存在,下游存在,则默认不输出 2、忽略上下游不同索引名、约束名对比,只对比下游是否存在同等约束下同等字段是否存在 3、分区只对比分区类型、分区键、分区表达式等,不对比具体每个分区下的情况
type Table ¶
type Table struct {
SchemaName string
TableName string
TableComment string
TableCharacterSet string
TableCollation string
Columns map[string]Column // KEY 字段名
Indexes []Index
PUConstraints []ConstraintPUKey
ForeignConstraints []ConstraintForeign
CheckConstraints []ConstraintCheck
IsPartition bool
Partitions []Partition // 获取分区键、分区类型以及子分区键、子分区类型
}
func NewMySQLTableINFO ¶
func NewMySQLTableINFO(schemaName, tableName string, engine *service.Engine) (*Table, string, error)
MySQL
func NewOracleTableINFO ¶
Oracle