source

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Jul 29, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CleanedComments

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

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