[default] element index

All elements
a c d e f g h i j l m n o p q r s t u v w _
_
top
__construct
QueryExplain::__construct() in QueryExplain.php
Constructor. See class documentation for explaination of the parameters
__construct
MySQLTableReport::__construct() in MySQLTableReport.php
create a new instance, pass configuration information describing the datasource and the report tables and fields.
__construct
AnemometerModel::__construct() in AnemometerModel.php
Constructor. Initialize the model object
__construct
Anemometer::__construct() in Anemometer.php
Constructor. Pass in the global configuration object
a
top
Anemometer
Anemometer in Anemometer.php
class Anemometer
Anemometer.php
Anemometer.php in Anemometer.php
AnemometerModel
AnemometerModel in AnemometerModel.php
class AnemometerModel
AnemometerModel.php
AnemometerModel.php in AnemometerModel.php
api
Anemometer::api() in Anemometer.php
main method for getting report results. This method can be called as an ajax callback and return the raw data in json format, or it can display a table or graph directly. All other methods that get report results use this either directly or as an ajax call.
c
top
checksum_exists
AnemometerModel::checksum_exists() in AnemometerModel.php
Query the database and return true if a given checksum exists
check_mysql_error
check_mysql_error() in Helpers.php
die with the error message if the given result handle or mysqli object has an error
clear
MySQLTableReport::clear() in MySQLTableReport.php
Remove blank strings as values in form fields.
connect_to_datasource
Try to connect to the datasource, throw an exception on failure
d
top
date_range
MySQLTableReport::date_range() in MySQLTableReport.php
look for a range of date values for the given column, and return values to be added to the WHERE clause
e
top
execute
MySQLTableReport::execute() in MySQLTableReport.php
Execute the generated query on the configured databse and return a result handle
explain
QueryExplain::explain() in QueryExplain.php
If the given query is a SELECT statement, return the explain plan
f
top
from
MySQLTableReport::from() in MySQLTableReport.php
define the primary table to select from
g
top
ge
MySQLTableReport::ge() in MySQLTableReport.php
apply a "greater than or equal to" operator to a WHERE condition, instead of the default equality matching
get_column_names
MySQLTableReport::get_column_names() in MySQLTableReport.php
retuns a list of all column names. These will be exactly the same as the columns returned by the query.
get_create
QueryExplain::get_create() in QueryExplain.php
Extract the table names from a query, and return the result of SHOW CREATE TABLE tablename;
get_create_table
Get the create table definitions for the query
get_custom_fields
returns a list of custom fields names.
get_data_source
AnemometerModel::get_data_source() in AnemometerModel.php
Given a data source name, get the properties for it.
get_data_source_names
Get the list of names for the configured data sources
get_default_report_action
return the default report action name; usually either report or graph_search
get_distinct_values
given a table and column, find all the unique values. This is a utility method often used when building dropdown lists on a search form, or getting values for pivot operations.
get_explain_for_sample
try to get the explain plan for a query
get_form_fields
AnemometerModel::get_form_fields() in AnemometerModel.php
get the field names for the given report
get_form_fields
MySQLTableReport::get_form_fields() in MySQLTableReport.php
return the list of form fields defined by the configuration parameters used to construct this object. Field names are prefixed by the table *alias*
get_form_field_values
return an associate array with form_field_name => value for all fields.
get_pivot_values
MySQLTableReport::get_pivot_values() in MySQLTableReport.php
return the list of values for a given pivot column
get_query_advisor
invoke pt-query-advisor and get its output
get_query_by_checksum
given a checksum, return the full database row from the fact table for it.
get_query_samples
Retrieve query samples from the history table, ordered from most recent
get_report
AnemometerModel::get_report() in AnemometerModel.php
get the full config information for the given report.
get_report_defaults
get the default search values for the specified report type
get_reviewers
AnemometerModel::get_reviewers() in AnemometerModel.php
Return a list of reviewers defined by the config file
get_review_types
return the list of review types. This is a configurable list of short text statuses that can describe the query.
get_search_uri
MySQLTableReport::get_search_uri() in MySQLTableReport.php
return a urlencoded string of parameters that were used in this report.
get_tables
MySQLTableReport::get_tables() in MySQLTableReport.php
returns the list of table names, not the aliases
get_tables_from_query
Try to parse the real table names out of a sql query
get_table_by_alias
gets the concrete name of a table for the given alias
get_table_fields
MySQLTableReport::get_table_fields() in MySQLTableReport.php
select the field names for the report tables from the database.
get_table_status
Get the table status info for the given query
get_table_status
Extract the table names and the return the result of SHOW TABLE STATUS LIKE 'tablename' for each table;
get_var
get_var() in Helpers.php
search global request variables $_POST and $_GET in that order and return the first defined value for the given key
get_visual_explain
invoke pt-visual-explain and get its output
graph_search
Anemometer::graph_search() in Anemometer.php
Search by using a graph. A brief search form is shown to allow a graph to be built. Html table results that corespond to the time range of the graph is displayed below. Regions can be selected in the graph directly which will update the table results with the new time range.
group
MySQLTableReport::group() in MySQLTableReport.php
set the GROUP BY expression
gt
MySQLTableReport::gt() in MySQLTableReport.php
greater than: see documentation for ge()
h
top
having
MySQLTableReport::having() in MySQLTableReport.php
set the HAVING clause
Helpers.php
Helpers.php in Helpers.php
i
top
index
Anemometer::index() in Anemometer.php
show the index page where users can select the datasource. If there's only
init_query_explainer
Create a new query explainer object for the given query sample
j
top
join
MySQLTableReport::join() in MySQLTableReport.php
add a table to the JOIN clause
l
top
$len
QueryTableParser::$len in QueryTableParser.php
le
MySQLTableReport::le() in MySQLTableReport.php
less than or equal to: see documentation for ge()
like
MySQLTableReport::like() in MySQLTableReport.php
like: see documentation for ge()
limit
MySQLTableReport::limit() in MySQLTableReport.php
set the LIMIT clause
Loader
Loader in Loader.php
class to mimic codigniter's syntax for loading views from the controller
Loader.php
Loader.php in Loader.php
lt
MySQLTableReport::lt() in MySQLTableReport.php
less than: see documentation for ge()
m
top
MySQLTableReport
MySQLTableReport in MySQLTableReport.php
class MySQLTableReport Generic reporting class. Given a configuration file, that describes the tables and fields to be searched, and information to connect to a database, take form data and generate an SQL query to run.
MySQLTableReport.php
MySQLTableReport.php in MySQLTableReport.php
n
top
ne
MySQLTableReport::ne() in MySQLTableReport.php
not equals: see documentation for ge()
o
top
order
MySQLTableReport::order() in MySQLTableReport.php
set the ORDER BY clause
p
top
$pos
QueryTableParser::$pos in QueryTableParser.php
parse
QueryTableParser::parse() in QueryTableParser.php
parse a query and return an array of table names from it.
pivot
MySQLTableReport::pivot() in MySQLTableReport.php
preform a pivot on a column. Get the unique list of values
prettyprint
prettyprint() in Helpers.php
wrap html pre tags around the given string, with class="prettyprint"
process_form_data
Read all form data and process values. This will be called automatically by query() and execute() methods.
q
top
$query
QueryTableParser::$query in QueryTableParser.php
query
MySQLTableReport::query() in MySQLTableReport.php
generate the SQL query and return it as a string.
QueryExplain
QueryExplain in QueryExplain.php
QueryExplain.php
QueryExplain.php in QueryExplain.php
QueryTableParser
QueryTableParser in QueryTableParser.php
class QueryTableParser
QueryTableParser.php
QueryTableParser.php in QueryTableParser.php
quicksearch
Anemometer::quicksearch() in Anemometer.php
Search for a checksum value. Redirect to show_query if it's found
r
top
raw_where
MySQLTableReport::raw_where() in MySQLTableReport.php
raw_where is an unprocessed string that is added to the WHERE clause
report
Anemometer::report() in Anemometer.php
Display the search form, and the report results (by default as a html table)
result_as_table
given a mysqli result handle, format a string to look like the mysql cli
s
top
samples
Anemometer::samples() in Anemometer.php
Show query samples for a specific checksum
select
MySQLTableReport::select() in MySQLTableReport.php
add a column to the select field list
set_data_source
AnemometerModel::set_data_source() in AnemometerModel.php
sets the currently active datasource.
set_pivot_values
MySQLTableReport::set_pivot_values() in MySQLTableReport.php
pivot operations require some setup -- this defines the list of values to turn into additional columns when we ask the report to pivot a column.
set_tables
AnemometerModel::set_tables() in AnemometerModel.php
set the current fact and dimension table. That is the query_review and query_review_history tables. This is used when we select samples or update a query by its checksum.
show_query
Anemometer::show_query() in Anemometer.php
Display a specific query from its checksum value
site_url
site_url() in Helpers.php
return the full URL for the base page of the site.
t
top
$table_tokens
QueryTableParser::$table_tokens in QueryTableParser.php
u
top
update_query
AnemometerModel::update_query() in AnemometerModel.php
Preform an update query on the given checksum
upd_query
Anemometer::upd_query() in Anemometer.php
Update the review and comments for a query by its checksum
v
top
view
Loader::view() in Loader.php
Finds and displays the given view, and makes the values in $data available to it.
w
top
where
MySQLTableReport::where() in MySQLTableReport.php
add a condition to the WHERE clause.
a c d e f g h i j l m n o p q r s t u v w _