Generator
class Generator (View source)
Handles generating SQL queries
Methods
returns a segment of the SQL WHERE clause regarding table name
returns a segment of the SQL WHERE clause regarding table name
returns a segment of the SQL WHERE clause regarding table type
returns the beginning of the SQL statement to fetch the list of tables
Returns SQL for fetching information on table indexes (SHOW INDEXES)
Returns SQL query for fetching columns for a table
No description
No description
No description
No description
No description
No description
No description
No description
No description
Function to get sql query for renaming the index using SQL RENAME INDEX Syntax
Function to get sql query to re-order the table
Function to get sql query to partition the table
No description
No description
Builds the SQL insert query
Details
static string
getTableNameCondition(string $escapedTabletable, bool $tblIsGroup)
returns a segment of the SQL WHERE clause regarding table name
static string
getTableNameConditionForMultiple(array $escapedTables)
returns a segment of the SQL WHERE clause regarding table name
static string
getTableTypeCondition(string|null $tableType)
returns a segment of the SQL WHERE clause regarding table type
static string
getSqlForTablesFull(string $thisDatabases, string $sqlWhereTable)
returns the beginning of the SQL statement to fetch the list of tables
static string
getTableIndexesSql(string $database, string $table, string $where = '')
Returns SQL for fetching information on table indexes (SHOW INDEXES)
static string
getColumnsSql(string $database, string $table, string|null $quotedColumn = null, bool $full = false)
Returns SQL query for fetching columns for a table
static string
getInformationSchemaRoutinesRequest(string $quotedDbName, string|null $routineType, string|null $quotedRoutineName)
No description
static string
getInformationSchemaEventsRequest(string $escapedDb, string|null $escapedEventName)
No description
static string
getInformationSchemaTriggersRequest(string $escapedDb, string|null $escapedTable)
No description
static string
getCreateTrigger(Trigger $newTrigger, string $delimiter)
No description
static string
getInformationSchemaDataForCreateRequest(string $user, string $host)
No description
static string
getInformationSchemaDataForGranteeRequest(string $user, string $host)
No description
static string
getInformationSchemaForeignKeyConstraintsRequest(string $escapedDatabase, string $tablesListForQueryCsv)
No description
static string
getInformationSchemaDatabasesFullRequest(bool $forceStats, string $sqlWhereSchema, string $sortBy, string $sortOrder, string $limit)
No description
static string
getInformationSchemaColumnsFullRequest(string|null $escapedDatabase, string|null $escapedTable, string|null $escapedColumn)
No description
static array
getInformationSchemaColumns(string|null $database, string|null $table, string|null $column)
No description
static string
getSqlQueryForIndexRename(string $dbName, string $tableName, string $oldIndexName, string $newIndexName)
Function to get sql query for renaming the index using SQL RENAME INDEX Syntax
static string
getQueryForReorderingTable(string $table, string $orderField, string|null $order)
Function to get sql query to re-order the table
static string
getQueryForPartitioningTable(string $table, string $partitionOperation, array $partitionNames)
Function to get sql query to partition the table
static string
getAddIndexSql(string $indexType, string $table, array $selectedColumns)
No description
static string
getAddPrimaryKeyStatement(string $table, string $column, bool $hasDropPrimaryKey)
No description
static string
buildInsertSqlQuery(string $table, bool $isInsertIgnore, array $queryFields, array $valueSets)
Builds the SQL insert query