-
Notifications
You must be signed in to change notification settings - Fork 49
collations
Frédéric Descamps edited this page Oct 20, 2020
·
2 revisions
NAME
collations - Collation utilities.
DESCRIPTION
A collection of collation utilite
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
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