generator

package
v0.0.0-...-fad6b96 Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2021 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultSchema = "main"
)

Variables

This section is empty.

Functions

func GetOrderedTableNames

func GetOrderedTableNames(r io.Reader) (tableNames []string, fields [][]string, excludeTables []string, err error)

GetOrderedTableNames parses the io.Reader with table names in them, and returns the table names in the order they are present in the file. No checks are done to see if the names are unique. The function will always return at least one tableName '*' which will always be in position zero, regardless of where it appears in the file. This 'table' will contain the global excluded fields.

func GetOrderedTablesNamesFromFile

func GetOrderedTablesNamesFromFile(filename string) (tableNames []string, fields [][]string, excludeTables []string, err error)

func InsertSQL

func InsertSQL(db *sql.DB, tableName string, skipFields ...string) []byte

func SortUniqueStrings

func SortUniqueStrings(ps *[]string)

SortUniqueStrings will sort and unique the given array of strings

Types

type Byer

type Byer struct {
	LessFn func(i, j int) bool
	LenFn  func() int
	SwapFn func(i, j int)
}

func (Byer) Len

func (b Byer) Len() int

func (Byer) Less

func (b Byer) Less(i, j int) bool

func (Byer) Swap

func (b Byer) Swap(i, j int)

Jump to

Keyboard shortcuts

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