oneOf

fun <T : RealmModel> RealmQuery<T>.oneOf(propertyName: String, value: Array<out String?>, casing: Case = Case.SENSITIVE): RealmQuery<T>

In comparison. This allows you to test if objects match any value in an array of values.

Return

the query object.

Parameters

fieldName

the field to compare.

values

array of values to compare with. If null or the empty array is provided the query will never match any results.

casing

how casing is handled. Case.INSENSITIVE works only for the Latin-1 characters.

Throws

if the field isn't a String field or values is null or empty.

fun <T : RealmModel> RealmQuery<T>.oneOf(propertyName: String, value: Array<out Byte?>): RealmQuery<T>

In comparison. This allows you to test if objects match any value in an array of values.

Return

the query object.

Parameters

fieldName

the field to compare.

values

array of values to compare with. If null or the empty array is provided the query will never match any results.

Throws

if the field isn't a Byte field. empty.

fun <T : RealmModel> RealmQuery<T>.oneOf(propertyName: String, value: Array<out Short?>): RealmQuery<T>

In comparison. This allows you to test if objects match any value in an array of values.

Return

the query object.

Parameters

fieldName

the field to compare.

values

array of values to compare with. If null or the empty array is provided the query will never match any results.

Throws

if the field isn't a Short field. empty.

fun <T : RealmModel> RealmQuery<T>.oneOf(propertyName: String, value: Array<out Int?>): RealmQuery<T>

In comparison. This allows you to test if objects match any value in an array of values.

Return

the query object.

Parameters

fieldName

the field to compare.

values

array of values to compare with. If null or the empty array is provided the query will never match any results.

Throws

if the field isn't a Integer field. or empty.

fun <T : RealmModel> RealmQuery<T>.oneOf(propertyName: String, value: Array<out Long?>): RealmQuery<T>

In comparison. This allows you to test if objects match any value in an array of values.

Return

the query object.

Parameters

fieldName

the field to compare.

values

array of values to compare with. If null or the empty array is provided the query will never match any results.

Throws

if the field isn't a Long field. empty.

fun <T : RealmModel> RealmQuery<T>.oneOf(propertyName: String, value: Array<out Double?>): RealmQuery<T>

In comparison. This allows you to test if objects match any value in an array of values.

Return

the query object.

Parameters

fieldName

the field to compare.

values

array of values to compare with. If null or the empty array is provided the query will never match any results.

Throws

if the field isn't a Double field. empty.

fun <T : RealmModel> RealmQuery<T>.oneOf(propertyName: String, value: Array<out Float?>): RealmQuery<T>

In comparison. This allows you to test if objects match any value in an array of values.

Return

the query object.

Parameters

fieldName

the field to compare.

values

array of values to compare with. If null or the empty array is provided the query will never match any results.

Throws

if the field isn't a Float field. empty.

fun <T : RealmModel> RealmQuery<T>.oneOf(propertyName: String, value: Array<out Boolean?>): RealmQuery<T>

In comparison. This allows you to test if objects match any value in an array of values.

Return

the query object.

Parameters

fieldName

the field to compare.

values

array of values to compare with. If null or the empty array is provided the query will never match any results.

Throws

if the field isn't a Boolean field. or empty.

fun <T : RealmModel> RealmQuery<T>.oneOf(propertyName: String, value: Array<out Date?>): RealmQuery<T>

In comparison. This allows you to test if objects match any value in an array of values.

Return

the query object.

Parameters

fieldName

the field to compare.

values

array of values to compare with. If null or the empty array is provided the query will never match any results.

Throws

if the field isn't a Date field. empty.