Sql
class Sql (View source)
Set of functions for the SQL executor
Methods
No description
Get the HTML for relational column dropdown During grid edit, if we have a relational field, returns the html for the dropdown
Get value of a column for a specific row (marked by $whereClause)
Get all the values for a enum column or set column in a table
Function to check whether this query is for just browsing
Function to check whether the user has rights to drop the database
Function to get the default sql query for browsing page
Function to store the query as a bookmark
Function to execute the query and send the response
Function to execute the query and send the response
Function to calculate new pos if pos is higher than number of rows of displayed table
Details
__construct(DatabaseInterface $dbi, Relation $relation, RelationCleanup $relationCleanup, Transformations $transformations, Template $template, BookmarkRepository $bookmarkRepository, Config $config)
No description
string
getHtmlForRelationalColumnDropdown(string $db, string $table, string $column, string $currentValue)
Get the HTML for relational column dropdown During grid edit, if we have a relational field, returns the html for the dropdown
string
getFullValuesForSetColumn(string $db, string $table, string $column, string $whereClause)
Get value of a column for a specific row (marked by $whereClause)
array|null
getValuesForColumn(string $db, string $table, string $columnName)
Get all the values for a enum column or set column in a table
static bool
isJustBrowsing(StatementInfo $statementInfo, bool $findRealEnd = false)
Function to check whether this query is for just browsing
bool
hasNoRightsToDropDatabase(StatementInfo $statementInfo, bool $allowUserDropDatabase, bool $isSuperUser)
Function to check whether the user has rights to drop the database
string
getDefaultSqlQueryForBrowse(string $db, string $table)
Function to get the default sql query for browsing page
void
storeTheQueryAsBookmark(BookmarkFeature|null $bookmarkFeature, string $db, string $bookmarkUser, string $sqlQueryForBookmark, string $bookmarkLabel, bool $bookmarkReplace)
Function to store the query as a bookmark
string
executeQueryAndSendQueryResponse(StatementInfo|null $statementInfo, bool $isGotoFile, string $db, string|null $table, string|null $sqlQueryForBookmark, string|null $messageToShow, array|null $sqlData, string $goto, string|null $dispQuery, Message|string|null $dispMessage, string $sqlQuery, string|null $completeQuery)
Function to execute the query and send the response
string
executeQueryAndGetQueryResponse(StatementInfo $statementInfo, bool $isGotoFile, string $db, string|null $table, string|null $sqlQueryForBookmark, string|null $messageToShow, array|null $sqlData, string $goto, string|null $dispQuery, Message|string|null $dispMessage, string $sqlQuery, string|null $completeQuery)
Function to execute the query and send the response
int
calculatePosForLastPage(string $db, string $table, int|null $pos)
Function to calculate new pos if pos is higher than number of rows of displayed table