utils

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Sep 15, 2020 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildCreateTableQuery

func BuildCreateTableQuery(label string, flag string, headers []Header) string

BuildCreateTableQuery generates a CREATE TABLE query from the given arguments.

func BuildInsertPrefixQuery

func BuildInsertPrefixQuery(label string, flag string, headers []Header) string

BuildInsertPrefixQuery generates a prefix for an insertion query without the values expression.

func BuildInsertValuesQuery

func BuildInsertValuesQuery(prefix string, row []interface{}) string

BuildInsertValuesQuery generates the values expression for an insertion query.

func CheckClusterConflicts

func CheckClusterConflicts(name string, names []string) (int, error)

CheckClusterConflicts scans through registered databases and compares a given string for existing naming conflicts. If it encounters a conflict, it will return the index of the conflicting database entry in the config.

func CheckClusterStatus

func CheckClusterStatus(urls []string) error

CheckClusterStatus iterates through registered databases as defined in the configuration file and checks to ensure they are present and accessible.

func CheckTableExists added in v0.5.5

func CheckTableExists(dbURI string, schemaName string, tableName string) (bool, error)

Types

type Header struct {
	Name     string
	Kind     reflect.Kind
	Position int
}

Header is a type that is used for expressing column header values passed into Shipments and through the pipeline.

Jump to

Keyboard shortcuts

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