Documentation ¶
Index ¶
- func ExtractParamsFromExecSubqueryClause(annotatedAST annotatedast.AnnotatedAst, node *sqlparser.ExecSubquery) parserutil.ParameterMap
- func ExtractParamsFromFromClause(annotatedAST annotatedast.AnnotatedAst, node sqlparser.TableExprs) parserutil.ParameterMap
- func ExtractParamsFromWhereClause(annotatedAST annotatedast.AnnotatedAst, node *sqlparser.Where) parserutil.ParameterMap
- func ExtractProviderStringsAndDetectCacheExemptMaterial(annotatedAST annotatedast.AnnotatedAst, node sqlparser.SQLNode, ...) ([]string, bool)
- func GenerateModifiedSelectSuffix(annotatedAST annotatedast.AnnotatedAst, node sqlparser.SQLNode, ...) string
- func GenerateModifiedWhereClause(annotatedAST annotatedast.AnnotatedAst, node *sqlparser.Where, ...) string
- func GenerateUnionTemplateQuery(annotatedAST annotatedast.AnnotatedAst, node *sqlparser.Union, ...) string
- type FragmentRewriteAstVisitor
- type FromRewriteAstVisitor
- type InternallyRoutableTypingAstVisitor
- type LeftoverReferencesAstVisitor
- type ParserParamAstVisitor
- type ParserPlaceholderParamAstVisitor
- type ParserTableAliasPairingAstVisitor
- type ParserTableExtractAstVisitor
- type ProviderStringAstVisitor
- type QueryRewriteAstVisitor
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExtractParamsFromExecSubqueryClause ¶
func ExtractParamsFromExecSubqueryClause( annotatedAST annotatedast.AnnotatedAst, node *sqlparser.ExecSubquery, ) parserutil.ParameterMap
func ExtractParamsFromFromClause ¶
func ExtractParamsFromFromClause( annotatedAST annotatedast.AnnotatedAst, node sqlparser.TableExprs, ) parserutil.ParameterMap
func ExtractParamsFromWhereClause ¶
func ExtractParamsFromWhereClause( annotatedAST annotatedast.AnnotatedAst, node *sqlparser.Where, ) parserutil.ParameterMap
func ExtractProviderStringsAndDetectCacheExemptMaterial ¶
func ExtractProviderStringsAndDetectCacheExemptMaterial( annotatedAST annotatedast.AnnotatedAst, node sqlparser.SQLNode, sqlSystem sql_system.SQLSystem, formatter sqlparser.NodeFormatter, namespaceCollection tablenamespace.Collection, ) ([]string, bool)
func GenerateModifiedSelectSuffix ¶
func GenerateModifiedSelectSuffix( annotatedAST annotatedast.AnnotatedAst, node sqlparser.SQLNode, sqlSystem sql_system.SQLSystem, formatter sqlparser.NodeFormatter, namespaceCollection tablenamespace.Collection, ) string
func GenerateModifiedWhereClause ¶
func GenerateModifiedWhereClause( annotatedAST annotatedast.AnnotatedAst, node *sqlparser.Where, sqlSystem sql_system.SQLSystem, formatter sqlparser.NodeFormatter, namespaceCollection tablenamespace.Collection, ) string
func GenerateUnionTemplateQuery ¶
func GenerateUnionTemplateQuery( annotatedAST annotatedast.AnnotatedAst, node *sqlparser.Union, sqlSystem sql_system.SQLSystem, formatter sqlparser.NodeFormatter, namespaceCollection tablenamespace.Collection, ) string
Types ¶
type FragmentRewriteAstVisitor ¶ added in v0.5.396
type FragmentRewriteAstVisitor interface { sqlparser.SQLAstVisitor ComputeQIDWhereSubTree() (sqlparser.Expr, error) GetRewrittenQuery() string SetRewrittenQuery(string) }
func NewFragmentRewriteAstVisitor ¶ added in v0.5.396
func NewFragmentRewriteAstVisitor( annotatedAST annotatedast.AnnotatedAst, iDColumnName string, shouldCollectTables bool, sqlSystem sql_system.SQLSystem, formatter sqlparser.NodeFormatter, namespaceCollection tablenamespace.Collection, ) FragmentRewriteAstVisitor
type FromRewriteAstVisitor ¶
type FromRewriteAstVisitor interface { sqlparser.SQLAstVisitor GetIndirectContexts() []drm.PreparedStatementCtx GetRewrittenQuery() string SetAvoidSQLSourceNaming(bool) GetHoistedOnClauseTables() []sqlparser.SQLNode }
func NewFromRewriteAstVisitor ¶
func NewFromRewriteAstVisitor( annotatedAST annotatedast.AnnotatedAst, iDColumnName string, shouldCollectTables bool, sqlSystem sql_system.SQLSystem, formatter sqlparser.NodeFormatter, namespaceCollection tablenamespace.Collection, annotations taxonomy.AnnotationCtxMap, dc drm.Config, ) FromRewriteAstVisitor
type InternallyRoutableTypingAstVisitor ¶ added in v0.5.451
type InternallyRoutableTypingAstVisitor interface { sqlparser.SQLAstVisitor GetSelectContext() (drm.PreparedStatementCtx, bool) WithFormatter(formatter sqlparser.NodeFormatter) InternallyRoutableTypingAstVisitor }
func NewInternallyRoutableTypingAstVisitor ¶ added in v0.5.451
func NewInternallyRoutableTypingAstVisitor( rawQuery string, annotatedAST annotatedast.AnnotatedAst, handlerCtx handler.HandlerContext, tables taxonomy.TblMap, dc drm.Config, namespaceCollection tablenamespace.Collection, ) InternallyRoutableTypingAstVisitor
type LeftoverReferencesAstVisitor ¶
type LeftoverReferencesAstVisitor interface { sqlparser.SQLAstVisitor GetTablesFoundThisIteration() map[sqlparser.TableExpr]taxonomy.AnnotationCtx }
TODO: must be view-aware.
func NewLeftoverReferencesAstVisitor ¶
func NewLeftoverReferencesAstVisitor( annotatedAST annotatedast.AnnotatedAst, colRefs parserutil.ColTableMap, tableToAnnotationCtx map[sqlparser.TableExpr]taxonomy.AnnotationCtx, ) LeftoverReferencesAstVisitor
type ParserParamAstVisitor ¶
type ParserParamAstVisitor interface { sqlparser.SQLAstVisitor GetParameters() parserutil.ParameterMap GetStringifiedParameters() map[string]interface{} }
func NewParamAstVisitor ¶
func NewParamAstVisitor( annotatedAST annotatedast.AnnotatedAst, iDColumnName string, shouldCollectTables bool, ) ParserParamAstVisitor
type ParserPlaceholderParamAstVisitor ¶
type ParserPlaceholderParamAstVisitor interface { sqlparser.SQLAstVisitor GetParameters() parserutil.ParameterMap }
Extracts "parameters" with null values for subsequent analyses. TODO: must be view-aware **but** scoped at statement level.
- View internal parameters scoped only to objects immediately inside view.
- Parameters in parent statement can only reference data exposed by view.
func NewPlaceholderParamAstVisitor ¶
func NewPlaceholderParamAstVisitor( annotatedAST annotatedast.AnnotatedAst, iDColumnName string, shouldCollectTables bool, ) ParserPlaceholderParamAstVisitor
type ParserTableAliasPairingAstVisitor ¶
type ParserTableAliasPairingAstVisitor interface { sqlparser.SQLAstVisitor GetColRefs() parserutil.ColTableMap GetAliasedColumns() parserutil.TableExprMap }
func NewTableAliasAstVisitor ¶
func NewTableAliasAstVisitor( annotatedAST annotatedast.AnnotatedAst, tables sqlparser.TableExprs, ) ParserTableAliasPairingAstVisitor
type ParserTableExtractAstVisitor ¶
type ParserTableExtractAstVisitor interface { sqlparser.SQLAstVisitor GetAliasMap() parserutil.TableAliasMap GetTables() sqlparser.TableExprs }
TODO: must be view-aware **but** scoped at statement level.
func NewTableExtractAstVisitor ¶
func NewTableExtractAstVisitor(annotatedAST annotatedast.AnnotatedAst) ParserTableExtractAstVisitor
type ProviderStringAstVisitor ¶
type ProviderStringAstVisitor interface { sqlparser.SQLAstVisitor ContainsAnalyticsCacheMaterial() bool ContainsCacheExemptMaterial() bool ContainsNativeBackendMaterial() bool GetProviderStrings() []string GetParserTablesCited() map[*sqlparser.AliasedTableExpr]sqlparser.TableName }
func NewProviderStringAstVisitor ¶
func NewProviderStringAstVisitor( annotatedAST annotatedast.AnnotatedAst, sqlSystem sql_system.SQLSystem, formatter sqlparser.NodeFormatter, namespaceCollection tablenamespace.Collection, ) ProviderStringAstVisitor
type QueryRewriteAstVisitor ¶
type QueryRewriteAstVisitor interface { sqlparser.SQLAstVisitor GenerateSelectDML() (drm.PreparedStatementCtx, error) WithFormatter(formatter sqlparser.NodeFormatter) QueryRewriteAstVisitor WithPrepStmtOffset(int) QueryRewriteAstVisitor }
func NewQueryRewriteAstVisitor ¶
func NewQueryRewriteAstVisitor( annotatedAST annotatedast.AnnotatedAst, handlerCtx handler.HandlerContext, tables taxonomy.TblMap, tableSlice []tableinsertioncontainer.TableInsertionContainer, annotations taxonomy.AnnotationCtxMap, discoGenIDs map[sqlparser.SQLNode]int, colRefs parserutil.ColTableMap, dc drm.Config, txnCtrlCtrs internaldto.TxnControlCounters, secondaryTccs []internaldto.TxnControlCounters, rewrittenWhere string, namespaceCollection tablenamespace.Collection, ) QueryRewriteAstVisitor
Click to show internal directories.
Click to hide internal directories.