PHP Class PMA\libraries\DbQbe

Show file Open project: phpmyadmin/phpmyadmin

Public Methods

Method Description
__construct ( string $dbname, array $savedSearchList = [], SavedSearches $currentSearch = null ) Public Constructor
getSelectionForm ( ) : string Provides the generated QBE form

Private Methods

Method Description
_fillJoinClauses ( &$finalized, array $relations, array $searchTables ) : void Fills the $finalized arrays with JOIN clauses for each of the tables
_getAndOrColCell ( integer $column_number, array $selected = null, boolean $last_column = false ) : string Provides And/Or modification cell along with Insert/Delete options (For modifying search form's table columns)
_getColumnAliasRow ( ) : string Provides search form's row containing column aliases
_getColumnNamesRow ( ) : string Provides search form's row containing column select options
_getCriteriaInputboxRow ( ) : string Provides search form's row containing criteria Inputboxes
_getCurrentSearch ( ) : SavedSearches Getter for current search
_getFootersOptions ( string $type ) : string Provides footer options for adding/deleting row/columns
_getFromClause ( array $formColumns ) : string Provides FROM clause for building SQL query
_getIndexes ( array $search_tables, array $search_columns, array $where_clause_columns ) : array Provides UNIQUE columns and INDEX columns present in criteria tables
_getInputboxRow ( integer $new_row_index ) : string Provides rows for criteria inputbox Insert/Delete options with AND/OR relationship modification options
_getInsDelAndOrCell ( integer $row_index, array $checked_options ) : string Provides Insert/Delete options for criteria inputbox with AND/OR relationship modification options
_getInsDelAndOrCriteriaRows ( ) : string Provides rows for criteria inputbox Insert/Delete options with AND/OR relationship modification options
_getJoinForFromClause ( array $searchTables, array $searchColumns ) : string Formulates the WHERE clause by JOINing tables
_getLeftJoinColumnCandidates ( array $search_tables, array $search_columns, array $where_clause_columns ) : array Provides UNIQUE columns and INDEX columns present in criteria tables
_getLeftJoinColumnCandidatesBest ( array $search_tables, array $where_clause_columns, array $unique_columns, array $index_columns ) : array Get best
_getMasterTable ( array $search_tables, array $search_columns, array $where_clause_columns, array $where_clause_tables ) : string Provides the main table to form the LEFT JOIN clause
_getModifyColumnsRow ( ) : string Provides search form's row containing column modifications options (For modifying search form's table columns)
_getNewColumnCount ( ) : integer Returns the new column count after adding and removing columns as instructed
_getOrderByClause ( ) : string Provides ORDER BY clause for building SQL query
_getSQLQuery ( array $formColumns ) : string Provides the generated SQL query
_getSavedSearchesField ( ) : string Get fields to display
_getSelectClause ( ) : string Provides SELECT clause for building SQL query
_getShowRow ( ) : string Provides search form's row containing SHOW checkboxes
_getSortOrder ( ) : string Provides search form's row containing sort order
_getSortOrderSelectCell ( integer $columnNumber, integer $sortOrder ) : string Provides select options list containing sort order
_getSortRow ( ) : string Provides search form's row containing sort(ASC/DESC) select options
_getSortSelectCell ( integer $column_number, string $asc_selected = '', string $desc_selected = '' ) : string Provides select options list containing sort options (ASC/DESC)
_getTableFooters ( ) : string Provides search form table's footer options
_getTablesList ( ) : string Provides a select list of database tables
_getWhereClause ( ) : string Provides WHERE clause for building SQL query
_getWhereClauseTablesAndColumns ( ) : array Provides columns and tables that have valid where clause criteria
_initializeCriteriasCount ( ) : integer Initialize _criteria_column_count
_loadCriterias ( ) : static Initialize criterias
_loadRelationsForTable ( &$relations, string $oneTable ) : void Loads relations for a given table into the $relations array
_setCriteriaTablesAndColumns ( ) : void Sets criteria tables and columns
_setSearchParams ( ) : void Sets search parameters
_showColumnSelectCell ( integer $column_number, string $selected = '' ) : string Provides select options list containing column names

Method Details

__construct() public method

Public Constructor
public __construct ( string $dbname, array $savedSearchList = [], SavedSearches $currentSearch = null )
$dbname string Database name
$savedSearchList array List of saved searches
$currentSearch SavedSearches Current search id

getSelectionForm() public method

Provides the generated QBE form
public getSelectionForm ( ) : string
return string QBE form