From e7a0a4d4aeb32aecb044fd79b5b6d3ee75b5408b Mon Sep 17 00:00:00 2001 From: Adam Brown Date: Wed, 27 Oct 2021 14:32:51 +0100 Subject: [PATCH] documenting the different query cases --- .../android/sdk/api/query/QueryStringValue.kt | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/query/QueryStringValue.kt b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/query/QueryStringValue.kt index 2461492ba7..31ec131c5c 100644 --- a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/query/QueryStringValue.kt +++ b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/query/QueryStringValue.kt @@ -35,8 +35,23 @@ sealed interface QueryStringValue { data class Contains(override val string: String, override val case: Case = Case.SENSITIVE) : ContentQueryStringValue enum class Case { + /** + * Match query sensitive to case + */ SENSITIVE, + + /** + * Match query insensitive to case, this only works for Latin-1 character sets + */ INSENSITIVE, + + /** + * Match query with input normalized (case insensitive) + * Works around Realms inability to sort or filter by case for non Latin-1 character sets + * Expects the target field to contain normalized data + * + * @see org.matrix.android.sdk.internal.util.Normalizer.normalize + */ NORMALIZED } }