dbexport

package
v0.0.6 Latest Latest
Warning

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

Go to latest
Published: Jan 15, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DumpTable

func DumpTable(tbl *Table, outputFolder string, filter string) error

func GetScopeToTblMap

func GetScopeToTblMap(scopeToTblMap map[string][]*Table) map[string][]*Table

func ImportTable

func ImportTable(tbl *Table, inputFolder string, colAndIdMap map[string]map[int64]int64) error

colAndIdMap : colName -> oldId -> newId 注意,这里只处理数据,不做建表工作,两个数据库的结构应该手动先同步好

Types

type Table

type Table struct {
	TableName string

	ColMap map[string]string //列名 -> 实际关联的列名(tblName_colName)
	// contains filtered or unexported fields
}

--------------------------------------------------

func GetTblInScopeMap

func GetTblInScopeMap(tblName string, scopeToTblMap map[string][]*Table) *Table

type TableColumn

type TableColumn struct {
	Field   string
	Type    string
	Null    string
	Key     string
	Default string
	Extra   string
}

TableColumn 表示表列的结构

Jump to

Keyboard shortcuts

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