processor

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Jun 26, 2024 License: Apache-2.0 Imports: 16 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 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.

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

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 (p *MySQLProcessor) GenDatabaseTableColumnDetail() (map[string]structure.NewColumn, map[string]map[string]structure.OldColumn, error)

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 (p *OracleProcessor) GenDatabaseTableColumnDetail() (map[string]structure.NewColumn, map[string]map[string]structure.OldColumn, error)

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.

func (*Table) ComparePartitionTableType

func (t *Table) ComparePartitionTableType() string

func (*Table) CompareTableCharsetCollation

func (t *Table) CompareTableCharsetCollation() string

func (*Table) CompareTableCheckConstraint

func (t *Table) CompareTableCheckConstraint() (string, error)

func (*Table) CompareTableColumnCharsetCollation

func (t *Table) CompareTableColumnCharsetCollation() string

func (*Table) CompareTableColumnCounts

func (t *Table) CompareTableColumnCounts() string

func (*Table) CompareTableColumnDetail

func (t *Table) CompareTableColumnDetail() (string, error)

func (*Table) CompareTableComment

func (t *Table) CompareTableComment() string

func (*Table) CompareTableForeignConstraint

func (t *Table) CompareTableForeignConstraint() (string, error)

func (*Table) CompareTableIndexDetail

func (t *Table) CompareTableIndexDetail() (string, error)

func (*Table) CompareTablePartitionDetail

func (t *Table) CompareTablePartitionDetail() (string, error)

func (*Table) CompareTablePrimaryConstraint

func (t *Table) CompareTablePrimaryConstraint() (string, error)

func (*Table) CompareTableUniqueConstraint

func (t *Table) CompareTableUniqueConstraint() (string, error)

Jump to

Keyboard shortcuts

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