base

package
v0.0.0-...-711487b Latest Latest
Warning

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

Go to latest
Published: Apr 1, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ReadSQLsFromSource

func ReadSQLsFromSource(env *schemadiff.Environment, inputSourceValue string) (sqls []string, err error)

ReadSQLsFromSource returns a list of CREATE TABLE|VIEW statements as read from given input.

func ReadSchemaFromSource

func ReadSchemaFromSource(env *schemadiff.Environment, inputSourceValue string) (*schemadiff.Schema, error)

ReadSchemaFromSource returns a loaded, validated, normalized formal Schema from the given source, or an error if either the source or the schema are invalid.

Types

type ErrUnknownInputSource

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

func (*ErrUnknownInputSource) Error

func (e *ErrUnknownInputSource) Error() string

type InputSource

type InputSource int
const (
	UnknownInputSource InputSource = iota
	StdInputSource
	FileInputSource
	DirectoryInputSource
	UriInputSource
)

func DetectInputSource

func DetectInputSource(inputSourceValue string) (InputSource, error)

DetectInputSource auto detects the type of source by the given value; it checks if the value is a file, directory, etc.

Jump to

Keyboard shortcuts

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