standard

package
v1.0.10 Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2026 License: GPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckStatementWithoutQuotedTextAndComment

func CheckStatementWithoutQuotedTextAndComment(statement string) bool

func SplitSQL

func SplitSQL(statement string) ([]base.SingleSQL, error)

SplitSQL splits the given SQL statement into multiple SQL statements.

func ValidateSQLForEditor

func ValidateSQLForEditor(statement string) (bool, bool, error)

ValidateSQLForEditor validates the SQL statement for SQL editor. We validate the statement by following steps: 1. Remove all quoted text(quoted identifier, string literal) and comments from the statement. 2. Use regexp to check if the statement is a normal SELECT statement and EXPLAIN statement. 3. For CTE, use regexp to check if the statement has UPDATE, DELETE and INSERT statements.

Types

This section is empty.

Jump to

Keyboard shortcuts

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