reducesql

package
v0.0.0-...-1b6ad0c Latest Latest
Warning

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

Go to latest
Published: Aug 11, 2020 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// LogUnknown determines whether unknown types encountered during
	// statement walking.
	LogUnknown bool
)
View Source
var SQLPasses = []reduce.Pass{
	removeStatement,
	replaceStmt,
	removeWithCTEs,
	removeWith,
	removeCreateDefs,
	removeValuesCols,
	removeWithSelectExprs,
	removeSelectAsExprs,
	removeValuesRows,
	removeSelectExprs,
	nullExprs,
	nullifyFuncArgs,
	removeLimit,
	removeOrderBy,
	removeOrderByExprs,
	removeGroupBy,
	removeGroupByExprs,
	removeCreateNullDefs,
	removeIndexCols,
	removeWindowPartitions,
	removeDBSchema,
	removeFroms,
	removeJoins,
	removeWhere,
	removeHaving,
	removeDistinct,
	simplifyOnCond,
	simplifyVal,
	removeCTENames,
	removeCasts,
	removeAliases,
	unparenthesize,
}

SQLPasses is a collection of reduce.Pass interfaces that reduce SQL statements.

Functions

func Pretty

func Pretty(s []byte) ([]byte, error)

Pretty formats input SQL into a standard format. Input SQL should be run through this before reducing so file size comparisons are useful.

Types

This section is empty.

Jump to

Keyboard shortcuts

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