reverse

package
v1.0.14 Latest Latest
Warning

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

Go to latest
Published: May 23, 2023 License: Apache-2.0 Imports: 8 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 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 Changer added in v1.0.8

type Changer interface {
	ChangeTableName() (map[string]string, error)
	ChangeTableColumnDatatype() (map[string]map[string]string, error)
	ChangeTableColumnDefaultValue() (map[string]map[string]string, error)
}

type Generator

type Generator interface {
	GenSchemaName() string
	GenTableName() string
	GenTablePrefix() (string, string)
	GenTableSuffix() (string, error)
	GenTableKeys() (tableKeys []string, compatibilityIndexSQL []string, err error)
	GenTablePrimaryKey() (primaryKeys []string, err error)
	GenTableUniqueKey() (uniqueKeys []string, err error)
	GenTableForeignKey() (foreignKeys []string, err error)
	GenTableCheckKey() (checkKeys []string, err error)
	GenTableUniqueIndex() (uniqueIndexes []string, compatibilityIndexSQL []string, err error)
	GenTableNormalIndex() (normalIndexes []string, compatibilityIndexSQL []string, err error)
	GenTableComment() (tableComment string, err error)
	GenTableColumn() (tableColumns []string, err error)
	GenTableColumnComment() (columnComments []string, err error)
	GenCreateTableDDL() (interface{}, error)
}

type Reader

type Reader interface {
	GetTablePrimaryKey() ([]map[string]string, error)
	GetTableUniqueKey() ([]map[string]string, error)
	GetTableForeignKey() ([]map[string]string, error)
	GetTableCheckKey() ([]map[string]string, error)
	GetTableUniqueIndex() ([]map[string]string, error)
	GetTableNormalIndex() ([]map[string]string, error)
	GetTableComment() ([]map[string]string, error)
	GetTableColumnMeta() ([]map[string]string, error)
	GetTableColumnComment() ([]map[string]string, error)
	GetTableInfo() (interface{}, error)
}

type Reverser

type Reverser interface {
	Reverse() error
}

type Write added in v1.0.10

type Write struct {
	Cfg     *config.Config
	RFile   *os.File
	CFile   *os.File
	RWriter *bufio.Writer
	CWriter *bufio.Writer
	Mutex   *sync.Mutex

	MySQL  *mysql.MySQL
	Oracle *oracle.Oracle
}

func NewWriter

func NewWriter(cfg *config.Config, mysql *mysql.MySQL, oracle *oracle.Oracle, reverseFile, compFile string) (*Write, error)

func (*Write) CWriteFile added in v1.0.10

func (w *Write) CWriteFile(s string) (nn int, err error)

func (*Write) Close added in v1.0.10

func (w *Write) Close() error

func (*Write) RWriteDB added in v1.0.10

func (w *Write) RWriteDB(s string) error

func (*Write) RWriteFile added in v1.0.10

func (w *Write) RWriteFile(s string) (nn int, err error)

type Writer

type Writer interface {
	Write(w *Write) (string, error)
}

Directories

Path Synopsis
mysql
m2o
t2o
oracle
o2m
o2t

Jump to

Keyboard shortcuts

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