cockroach: github.com/cockroachdb/cockroach/pkg/testutils/reduce/reducesql Index | Files

package reducesql

import "github.com/cockroachdb/cockroach/pkg/testutils/reduce/reducesql"

Index

Package Files

reducesql.go

Variables

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

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

func Pretty Uses

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.

Package reducesql imports 9 packages (graph) and is imported by 1 packages. Updated 2019-09-15. Refresh now. Tools for package owners.