class Results (View source)

Handle all the functionalities related to displaying results of sql queries, stored procedure, browsing sql processes or displaying binary log.

Constants

private POSITION_LEFT

private POSITION_RIGHT

private POSITION_BOTH

private POSITION_NONE

DISPLAY_FULL_TEXT

DISPLAY_PARTIAL_TEXT

RELATIONAL_KEY

RELATIONAL_DISPLAY_COLUMN

GEOMETRY_DISP_GEOM

GEOMETRY_DISP_WKT

GEOMETRY_DISP_WKB

private SMART_SORT_ORDER

private ASCENDING_SORT_DIR

private DESCENDING_SORT_DIR

ALL_ROWS

private ACTION_LINK_CONTENT_ICONS

private ACTION_LINK_CONTENT_TEXT

Properties

Template $template

Methods

__construct(DatabaseInterface $dbi, Config $config, string $db, string $table, int $server, string $goto, string $sqlQuery)

No description

void
setProperties(int|string $unlimNumRows, array $fieldsMeta, bool $isCount, bool $isGroup, bool $isExport, bool $isFunction, bool $isAnalyse, int|string $numRows, float $queryTime, bool $isMaintenance, bool $isExplain, bool $isShow, bool $printView, bool $editable, bool $isBrowseDistinct)

Set properties which were not initialized at the constructor

void
setConfigParamsForDisplayTable(StatementInfo $statementInfo)

Checks the posted options for viewing query results and sets appropriate values in the session.

string
getTable(ResultInterface $dtResult, DisplayParts $displayParts, StatementInfo $statementInfo, bool $isLimitedDisplay = false)

Prepare a table of results returned by a SQL query.

Details

__construct(DatabaseInterface $dbi, Config $config, string $db, string $table, int $server, string $goto, string $sqlQuery)

No description

Parameters

DatabaseInterface $dbi
Config $config
string $db

the database name

string $table

the table name

int $server

the server id

string $goto

the URL to go back in case of errors

string $sqlQuery

the SQL query

void setProperties(int|string $unlimNumRows, array $fieldsMeta, bool $isCount, bool $isGroup, bool $isExport, bool $isFunction, bool $isAnalyse, int|string $numRows, float $queryTime, bool $isMaintenance, bool $isExplain, bool $isShow, bool $printView, bool $editable, bool $isBrowseDistinct)

Set properties which were not initialized at the constructor

Parameters

int|string $unlimNumRows

the total number of rows returned by the SQL query without any appended "LIMIT" clause programmatically

array $fieldsMeta

meta information about fields

bool $isCount

statement is SELECT COUNT

bool $isGroup

statement has GROUP BY

bool $isExport

statement contains INTO OUTFILE

bool $isFunction

statement contains a function like SUM()

bool $isAnalyse

statement contains PROCEDURE ANALYSE

int|string $numRows

total no. of rows returned by SQL query

float $queryTime

time taken for execute the SQL query

bool $isMaintenance

statement contains a maintenance command

bool $isExplain

statement contains EXPLAIN

bool $isShow

statement contains SHOW

bool $printView

print view was requested

bool $editable

whether the results set is editable

bool $isBrowseDistinct

whether browsing distinct values

Return Value

void

void setConfigParamsForDisplayTable(StatementInfo $statementInfo)

Checks the posted options for viewing query results and sets appropriate values in the session.

make maximum remembered queries configurable move/split into SQL class!? currently this is called twice unnecessary ignore LIMIT and ORDER in query!?

Parameters

StatementInfo $statementInfo

Return Value

void

string getTable(ResultInterface $dtResult, DisplayParts $displayParts, StatementInfo $statementInfo, bool $isLimitedDisplay = false)

Prepare a table of results returned by a SQL query.

Parameters

ResultInterface $dtResult

the link id associated to the query which results have to be displayed

DisplayParts $displayParts
StatementInfo $statementInfo
bool $isLimitedDisplay

With limited operations or not

Return Value

string

Generated HTML content for resulted table