norm

package
v1.1.0-beta.0...-a3f823d Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NormalizeStmtForBinding

func NormalizeStmtForBinding(stmtNode ast.StmtNode, options ...optionFunc) (normalizedStmt, exactSQLDigest string)

NormalizeStmtForBinding normalizes a statement for binding. when fuzz is false, schema names will be completed automatically: `select * from t` --> `select * from db . t`. when fuzz is true, schema names will be eliminated automatically: `select * from db . t` --> `select * from t`.

func WithFuzz

func WithFuzz(fuzz bool) optionFunc

WithFuzz specifies whether to eliminate schema names.

func WithSpecifiedDB

func WithSpecifiedDB(specifiedDB string) optionFunc

WithSpecifiedDB specifies the specified DB name.

Types

This section is empty.

Jump to

Keyboard shortcuts

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