pgquery

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Aug 7, 2024 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const CommentPrefix = "--"

Variables

This section is empty.

Functions

func GetCreateIndexStatement

func GetCreateIndexStatement(statement *pg_query.RawStmt) *pg_query.IndexStmt

func GetDropIndexStatement

func GetDropIndexStatement(statement *pg_query.RawStmt) *pg_query.DropStmt

func IsCommentPrefix

func IsCommentPrefix(input string, position int) bool

func IsNewline

func IsNewline(input string, position int) bool

func IsValidOffset

func IsValidOffset(input string, offset int) bool

func SkipComments

func SkipComments(input string, offset int) int

func SkipSpace

func SkipSpace(input string, offset int) int

func SkipUntilNewLine

func SkipUntilNewLine(input string, offset int) int

func SkipWhitespaceAndComments

func SkipWhitespaceAndComments(input string, byteOffset int) int

Types

type Line

type Line struct {
	Number         int
	TextByteOffset int
}

type TextLocation

type TextLocation struct {
	LineNumber       int
	LineCharPosition int
}

func GetTextLocation

func GetTextLocation(input string, byteOffset int) TextLocation

Jump to

Keyboard shortcuts

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