Documentation ¶
Index ¶
- Constants
- func GetOrderedTableNames(r io.Reader) (tableNames []string, fields [][]string, excludeTables []string, err error)
- func GetOrderedTablesNamesFromFile(filename string) (tableNames []string, fields [][]string, excludeTables []string, err error)
- func InsertSQL(db *sql.DB, tableName string, skipFields ...string) []byte
- func SortUniqueStrings(ps *[]string)
- type Byer
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 SortUniqueStrings ¶
func SortUniqueStrings(ps *[]string)
SortUniqueStrings will sort and unique the given array of strings
Types ¶
Click to show internal directories.
Click to hide internal directories.