util

package
v0.0.17 Latest Latest
Warning

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

Go to latest
Published: Jul 20, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	StmtRegexCreateTable = StmtRegex{
		Regex: regexp.MustCompile(`^\s*(//+\s*|/\*\s*)?\S+\s*:\s*table(s)?\s*[: ]\s*((CREATE\s+TABLE\s+)?\S+.*)`),
		Index: 3,
	}
	StmtRegexCreateTableConstraint = StmtRegex{
		Regex: regexp.MustCompile(`^\s*(//+\s*|/\*\s*)?\S+\s*:\s*constraint(s)?\s*[: ]\s*(\S+.*)`),
		Index: 3,
	}
	StmtRegexCreateTableOptions = StmtRegex{
		Regex: regexp.MustCompile(`^\s*(//+\s*|/\*\s*)?\S+\s*:\s*option(s)?\s*[: ]\s*(\S+.*)`),
		Index: 3,
	}
	StmtRegexCreateIndex = StmtRegex{
		Regex: regexp.MustCompile(`^\s*(//+\s*|/\*\s*)?\S+\s*:\s*index(es)?\s*[: ]\s*(\S+.*)`),
		Index: 3,
	}
)

Functions

func TrimCommentElementHasPrefix

func TrimCommentElementHasPrefix(stringSlice []string, prefix string) []string

func TrimCommentElementTailEmpty

func TrimCommentElementTailEmpty(stringSlice []string) []string

Types

type StmtRegex

type StmtRegex struct {
	Regex *regexp.Regexp
	Index int
}

Jump to

Keyboard shortcuts

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