QueryAdvisorRules

QueryAdvisorRules

QueryAdvisorRules encapsulates rules for checking queries.

Summary
QueryAdvisorRulesQueryAdvisorRules encapsulates rules for checking queries.
Functions
new
get_rules
get_outer_tablesGet the outer tables in joins.
determine_table_for_columnDetermine which table a column belongs to.
_d

Functions

new

sub new

get_rules

sub get_rules

get_outer_tables

sub get_outer_tables

Get the outer tables in joins.

Parameters

$tblsArrayref of hashrefs with table info

Returns

Array of hashref to the outer tables

determine_table_for_column

sub determine_table_for_column

Determine which table a column belongs to.  No extensive, online effort is made to determine the column’s table.  The caller is responsible for using the parsed SQL structure to get its db/tables and their tbl structs and providing a list of them.

Parameters

%argsArguments

Required Arguments

columncolumn name, not quoted

Optional Arguments

tbl_structsarrayref hashrefs returned by TableParser::parse()

Returns

Table name, not quoted

_d

sub _d
AdvisorRules is a parent class for advisor rule modules like QueryAdivsorRules.
sub new
sub get_rules
sub get_outer_tables
Get the outer tables in joins.
sub determine_table_for_column
Determine which table a column belongs to.
sub _d
sub parse
Parse SHOW CREATE TABLE.
Close