collations - lefred/mysqlshell-plugins GitHub Wiki
collations
NAME
collations - Collation utilities.
DESCRIPTION
A collection of collation utilite
methods
nonUnique
Find non-unique values in a column for a given collation
collations.nonUnique(table, column, collation[, schema][,session])
- table: String. Table name to use.
- column: String. column to check.
- collation: String. collation to check.
- schema: String. Schema to use.
- session: Object. The session to be used on the operation
JS collations.nonUnique('t','v','utf8_general_ci', 'test')
Non-Unique values
=================
🍣
🍺
As
Äs
Ås
Ås
bilou2
bilou2
Orebro
Örebro
=================
Total: 10 non-unique values out of 16
JS collations.nonUnique('t','v','utf8mb4_0900_ai_ci', 'test')
Non-Unique values
=================
As
Äs
Ås
Ås
bilou2
bilou2
Ørebro
Orebro
Örebro
=================
Total: 9 non-unique values out of 16
ouOfOrder
Find values in a column that becomes out of order for a given collation
collations.outOfOrder(table, column, collation[, schema][,session])
- table: String. Table name to use.
- column: String. column to check.
- collation: String. collation to check.
- schema: String. Schema to use.
- session: Object. The session to be used on the operation.
JS collations.outOfOrder('t','v','utf8_general_ci', 'test')
There are changes in the order
JS collations.outOfOrder('t','v','utf8mb4_0900_ai_ci', 'test')
The order is retained