keymap

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Mar 31, 2021 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Key

type Key struct {
	Table, Column string
}

func ParseKey

func ParseKey(rawKey string) (*Key, error)

func (*Key) ColumnName

func (key *Key) ColumnName() *ast.ColumnName

func (*Key) String

func (key *Key) String() string

type KeyMap

type KeyMap struct {
	PrimaryKey  *Key
	ForeignKeys []*Key
}

func Parse

func Parse(contents string) (maps []KeyMap, err error)

func ParseFile

func ParseFile(filename string) (maps []KeyMap, err error)

func ParseLine

func ParseLine(line string) (keyMap KeyMap, err error)

type KeyMatcher

type KeyMatcher struct {
	// contains filtered or unexported fields
}

func NewKeyMatcher

func NewKeyMatcher(keymaps []KeyMap) *KeyMatcher

func (KeyMatcher) Match

func (matcher KeyMatcher) Match(t1, t2 string) map[KeyPair]bool

func (KeyMatcher) MatchKey

func (matcher KeyMatcher) MatchKey(k1, k2 Key) bool

func (KeyMatcher) MatchRandom

func (matcher KeyMatcher) MatchRandom(t1, t2 string) *KeyPair

type KeyPair

type KeyPair struct {
	K1, K2 Key
}

func NewKeyPair

func NewKeyPair(k1, k2 Key) KeyPair

type TablePair

type TablePair struct {
	// contains filtered or unexported fields
}

func NewTablePair

func NewTablePair(t1, t2 string) TablePair

Jump to

Keyboard shortcuts

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