source

package
v1.24.0 Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CleanedComments added in v1.23.0

func CleanedComments(rawSQL string, cs CommentSyntax) ([]string, error)

func LineNumber

func LineNumber(source string, head int) (int, int)

func Mutate

func Mutate(raw string, a []Edit) (string, error)

func Pluck

func Pluck(source string, location, length int) (string, error)

func StripComments

func StripComments(sql string) (string, []string, error)

Types

type CommentSyntax added in v1.23.0

type CommentSyntax struct {
	Dash      bool
	Hash      bool
	SlashStar bool
}

type Edit

type Edit struct {
	Location int
	Old      string
	New      string
	OldFunc  func(string) int
}

Jump to

Keyboard shortcuts

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