Help us shape the future of Go! Take the 2026 Go Developer Survey

sqltext

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package sqltext scans SQL without altering statement boundaries or quoted bodies.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Statements

func Statements(tokens []Token) [][]Token

Statements returns unquoted tokens grouped by real top-level boundaries. SQL-standard BEGIN ATOMIC and SQLite trigger bodies keep their internal semicolons.

Types

type Token

type Token struct {
	Text            string
	Start, End      int
	Comment, Quoted bool
}

func Scan

func Scan(s string) ([]Token, error)

func ScanDialect

func ScanDialect(s, dialect string) ([]Token, error)

Jump to

Keyboard shortcuts

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