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 p. 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 MySQLProcessor
- func (p *MySQLProcessor) GenDatabaseSchemaTable() (string, string)
- func (p *MySQLProcessor) GenDatabaseTableCharset() (string, error)
- func (p *MySQLProcessor) GenDatabaseTableCheckConstraintDetail() (map[string]structure.ConstraintCheck, error)
- func (p *MySQLProcessor) GenDatabaseTableCollation() (string, error)
- func (p *MySQLProcessor) GenDatabaseTableColumnDetail() (map[string]structure.NewColumn, map[string]map[string]structure.OldColumn, ...)
- func (p *MySQLProcessor) GenDatabaseTableComment() (string, error)
- func (p *MySQLProcessor) GenDatabaseTableForeignConstraintDetail() (map[string]structure.ConstraintForeign, error)
- func (p *MySQLProcessor) GenDatabaseTableIndexDetail() (map[string]structure.Index, error)
- func (p *MySQLProcessor) GenDatabaseTablePartitionDetail() ([]structure.Partition, error)
- func (p *MySQLProcessor) GenDatabaseTablePrimaryConstraintDetail() (map[string]structure.ConstraintPrimary, error)
- func (p *MySQLProcessor) GenDatabaseTableUniqueConstraintDetail() (map[string]structure.ConstraintUnique, error)
- type OracleProcessor
- func (p *OracleProcessor) GenDatabaseSchemaTable() (string, string)
- func (p *OracleProcessor) GenDatabaseTableCharset() (string, error)
- func (p *OracleProcessor) GenDatabaseTableCheckConstraintDetail() (map[string]structure.ConstraintCheck, error)
- func (p *OracleProcessor) GenDatabaseTableCollation() (string, error)
- func (p *OracleProcessor) GenDatabaseTableColumnDetail() (map[string]structure.NewColumn, map[string]map[string]structure.OldColumn, ...)
- func (p *OracleProcessor) GenDatabaseTableComment() (string, error)
- func (p *OracleProcessor) GenDatabaseTableForeignConstraintDetail() (map[string]structure.ConstraintForeign, error)
- func (p *OracleProcessor) GenDatabaseTableIndexDetail() (map[string]structure.Index, error)
- func (p *OracleProcessor) GenDatabaseTablePartitionDetail() ([]structure.Partition, error)
- func (p *OracleProcessor) GenDatabaseTablePrimaryConstraintDetail() (map[string]structure.ConstraintPrimary, error)
- func (p *OracleProcessor) GenDatabaseTableUniqueConstraintDetail() (map[string]structure.ConstraintUnique, error)
- type Table
- func (t *Table) ComparePartitionTableType() string
- func (t *Table) CompareTableCharsetCollation() string
- func (t *Table) CompareTableCheckConstraint() (string, error)
- func (t *Table) CompareTableColumnCharsetCollation() string
- func (t *Table) CompareTableColumnCounts() string
- func (t *Table) CompareTableColumnDetail() (string, error)
- func (t *Table) CompareTableComment() string
- func (t *Table) CompareTableForeignConstraint() (string, error)
- func (t *Table) CompareTableIndexDetail() (string, error)
- func (t *Table) CompareTablePartitionDetail() (string, error)
- func (t *Table) CompareTablePrimaryConstraint() (string, error)
- func (t *Table) CompareTableUniqueConstraint() (string, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MySQLProcessor ¶
type MySQLProcessor struct { Ctx context.Context `json:"-"` TaskName string `json:"taskName"` TaskFlow string `json:"taskFlow"` SchemaName string `json:"schemaName"` TableName string `json:"tableName"` DBCharset string `json:"dbCharset"` BuildinDatatypeRules []*buildin.BuildinDatatypeRule `json:"-"` BuildinDefaultValueRules []*buildin.BuildinDefaultvalRule `json:"-"` ColumnRouteRules map[string]string `json:"columnRouteRules"` IsBaseline bool `json:"isBaseline"` Database database.IDatabase `json:"-"` }
func (*MySQLProcessor) GenDatabaseSchemaTable ¶
func (p *MySQLProcessor) GenDatabaseSchemaTable() (string, string)
func (*MySQLProcessor) GenDatabaseTableCharset ¶
func (p *MySQLProcessor) GenDatabaseTableCharset() (string, error)
func (*MySQLProcessor) GenDatabaseTableCheckConstraintDetail ¶
func (p *MySQLProcessor) GenDatabaseTableCheckConstraintDetail() (map[string]structure.ConstraintCheck, error)
func (*MySQLProcessor) GenDatabaseTableCollation ¶
func (p *MySQLProcessor) GenDatabaseTableCollation() (string, error)
func (*MySQLProcessor) GenDatabaseTableColumnDetail ¶
func (*MySQLProcessor) GenDatabaseTableComment ¶
func (p *MySQLProcessor) GenDatabaseTableComment() (string, error)
func (*MySQLProcessor) GenDatabaseTableForeignConstraintDetail ¶
func (p *MySQLProcessor) GenDatabaseTableForeignConstraintDetail() (map[string]structure.ConstraintForeign, error)
func (*MySQLProcessor) GenDatabaseTableIndexDetail ¶
func (p *MySQLProcessor) GenDatabaseTableIndexDetail() (map[string]structure.Index, error)
func (*MySQLProcessor) GenDatabaseTablePartitionDetail ¶
func (p *MySQLProcessor) GenDatabaseTablePartitionDetail() ([]structure.Partition, error)
func (*MySQLProcessor) GenDatabaseTablePrimaryConstraintDetail ¶
func (p *MySQLProcessor) GenDatabaseTablePrimaryConstraintDetail() (map[string]structure.ConstraintPrimary, error)
func (*MySQLProcessor) GenDatabaseTableUniqueConstraintDetail ¶
func (p *MySQLProcessor) GenDatabaseTableUniqueConstraintDetail() (map[string]structure.ConstraintUnique, error)
type OracleProcessor ¶
type OracleProcessor struct { Ctx context.Context `json:"-"` TaskName string `json:"taskName"` TaskFlow string `json:"taskFlow"` SchemaName string `json:"schemaName"` TableName string `json:"tableName"` DBCharset string `json:"dbCharset"` DBCollation bool `json:"dbCollation"` Database database.IDatabase `json:"-"` BuildinDatatypeRules []*buildin.BuildinDatatypeRule `json:"-"` BuildinDefaultValueRules []*buildin.BuildinDefaultvalRule `json:"-"` ColumnRouteRules map[string]string `json:"columnRouteRules"` IsBaseline bool `json:"isBaseline"` TableCollation string `json:"tableCollation"` SchemaCollation string `json:"schemaCollation"` NLSComp string `json:"NLSComp"` }
func (*OracleProcessor) GenDatabaseSchemaTable ¶
func (p *OracleProcessor) GenDatabaseSchemaTable() (string, string)
func (*OracleProcessor) GenDatabaseTableCharset ¶
func (p *OracleProcessor) GenDatabaseTableCharset() (string, error)
func (*OracleProcessor) GenDatabaseTableCheckConstraintDetail ¶
func (p *OracleProcessor) GenDatabaseTableCheckConstraintDetail() (map[string]structure.ConstraintCheck, error)
func (*OracleProcessor) GenDatabaseTableCollation ¶
func (p *OracleProcessor) GenDatabaseTableCollation() (string, error)
func (*OracleProcessor) GenDatabaseTableColumnDetail ¶
func (*OracleProcessor) GenDatabaseTableComment ¶
func (p *OracleProcessor) GenDatabaseTableComment() (string, error)
func (*OracleProcessor) GenDatabaseTableForeignConstraintDetail ¶
func (p *OracleProcessor) GenDatabaseTableForeignConstraintDetail() (map[string]structure.ConstraintForeign, error)
func (*OracleProcessor) GenDatabaseTableIndexDetail ¶
func (p *OracleProcessor) GenDatabaseTableIndexDetail() (map[string]structure.Index, error)
func (*OracleProcessor) GenDatabaseTablePartitionDetail ¶
func (p *OracleProcessor) GenDatabaseTablePartitionDetail() ([]structure.Partition, error)
func (*OracleProcessor) GenDatabaseTablePrimaryConstraintDetail ¶
func (p *OracleProcessor) GenDatabaseTablePrimaryConstraintDetail() (map[string]structure.ConstraintPrimary, error)
func (*OracleProcessor) GenDatabaseTableUniqueConstraintDetail ¶
func (p *OracleProcessor) GenDatabaseTableUniqueConstraintDetail() (map[string]structure.ConstraintUnique, error)
type Table ¶
type Table struct { TaskName string TaskFlow string Source *structure.Table Target *structure.Table }
Table structure comparison Based on the upstream Oracle table structure information, compare the downstream MySQL table structure 1. If the upstream exists and the downstream does not exist, the record will be output. If the upstream does not exist and the downstream exists, the record will not be output by default. 2. Ignore the comparison of different index names and constraint names between the upstream and downstream, and only compare whether the same fields exist under the same constraints downstream. 3. Partitions only compare partition types, partition keys, partition expressions, etc., and do not compare the specific conditions of each partition.