query_analysis_routines
SYNOPSIS
Query analysis routines (BETA): routines to parse and analyze query text, including dependency analysis.
- get_event_dependencies(): Analyze and list the dependencies of a given event.
- get_routine_dependencies(): Analyze and list the dependencies of a given routine.
- get_sql_dependencies(): Analyze and list the dependencies of a given query.
- get_view_dependencies(): Analyze and list the dependencies of a given view.
DESCRIPTION
These routines parse a given SQL query's text and detect its internal structure and dependencies.
These are not full blown SQL parsers. At the moment the main intent is to be able to realize the objects on which a query depends: tables, views, routines etc.
The queries themselves can be of various types, including:
- CREATE VIEW statements.
- CREATE FUNCTION/PROCEDURE statements, including stored routine code within.
- CREATE EVENT statements, including stored routine code within.
The idea is to be able to quickly realize a dependency graph. For example, to realize the tables/views a view depends on.
Query analysis routines are in BETA stage.