feat: add collation to maria db indexes query and analyser

This commit is contained in:
Nybkox
2024-12-03 19:28:16 +01:00
parent 64a58252e5
commit 6b40190097
2 changed files with 6 additions and 2 deletions

View File

@@ -4,7 +4,11 @@ module.exports = `
TABLE_NAME AS tableName,
COLUMN_NAME AS columnName,
INDEX_TYPE AS indexType,
NON_UNIQUE AS nonUnique
NON_UNIQUE AS nonUnique,
CASE COLLATION
WHEN 'D' THEN 1
ELSE 0
END AS isDescending
FROM INFORMATION_SCHEMA.STATISTICS
WHERE TABLE_SCHEMA = '#DATABASE#' AND TABLE_NAME =OBJECT_ID_CONDITION AND INDEX_NAME != 'PRIMARY'
ORDER BY SEQ_IN_INDEX