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 CompatibilityDBTips(file *FileMW, sourceSchema string, ...) error
- func CompatibilityPreCheck(oracleDBVersion string, isExtended bool, engine *service.Engine, ...) ([]string, map[string][]map[string]string, map[string]string, map[string]string, ...)
- func MySQLReverseToOracleTable(engine *service.Engine, cfg *config.CfgFile) error
- func ReverseMySQLTableColumnMapRule(sourceSchema, sourceTableName, columnName string, ...) (string, error)
- type FileMW
- type ReverseWriter
- type Table
- func (t Table) CreateColumnMeta() ([]string, []string, error)
- func (t Table) GenCreateCKSQL() ([]string, error)
- func (t Table) GenCreateFKSQL() ([]string, []string, error)
- func (t Table) GenCreateIndexSQL() ([]string, error)
- func (t Table) GenCreatePKUKSQL() ([]string, error)
- func (t Table) GenCreateTableCommentSQL() (string, error)
- func (t Table) GenCreateTableSQL() (string, []string, error)
- func (t *Table) String() string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CompatibilityDBTips ¶
func CompatibilityPreCheck ¶
func ReverseMySQLTableColumnMapRule ¶
func ReverseMySQLTableColumnMapRule( sourceSchema, sourceTableName, columnName string, dataType, dataNullable, comments, dataDefault string, dataScaleValue, dataPrecisionValue, dataLengthValue, datePrecisionValue, columnCollation string, engine *service.Engine) (string, error)
MySQL 表字段映射转换 -> Reverse 阶段
Types ¶
type ReverseWriter ¶
type ReverseWriter struct {
DBVersion string
CreateTable string
CreateIndex []string
CreateTableComment string
CreateColumnComment []string
ReverseTable Table
RevFileMW *FileMW `json:"-"`
CompFileMW *FileMW `json:"-"`
}
func NewReverseWriter ¶
func NewReverseWriter(t Table, revFileMW, compFileMW *FileMW) (*ReverseWriter, error)
func (*ReverseWriter) Reverse ¶
func (d *ReverseWriter) Reverse() error
func (*ReverseWriter) String ¶
func (d *ReverseWriter) String() string
type Table ¶
type Table struct {
MySQLDBType string
OracleDBVersion string
OracleExtendedMode bool
SourceSchemaName string
TargetSchemaName string
SourceTableName string
IsPartition bool
TargetTableName string
SourceTableCharacterSet string
SourceTableCollation string
Overwrite bool
Engine *service.Engine `json:"-"`
}