FindNearestOptions

class FindNearestOptions : AbstractOptions


Summary

Public constructors

Creates a new, empty FindNearestOptions object.

Public functions

open FindNearestOptions
FindNearestOptions
withDistanceField(distanceField: Field)

Add a field containing the distance to the result.

FindNearestOptions?
withDistanceField(distanceField: String?)

Add a field containing the distance to the result.

FindNearestOptions
withLimit(limit: Long)

Specifies the upper bound of documents to return.

Inherited functions

From com.google.firebase.firestore.pipeline.AbstractOptions
FindNearestOptions
adding(newOptions: AbstractOptions<*>)
FindNearestOptions
with(key: String, subSection: AbstractOptions<*>)
FindNearestOptions
FindNearestOptions
with(key: String, value: Boolean)

Specify generic Boolean option

FindNearestOptions
with(key: String, value: Double)

Specify generic Double option

FindNearestOptions
with(key: String, value: Field)

Specify generic Field option

FindNearestOptions
with(key: String, value: InternalOptions)
FindNearestOptions
with(key: String, value: Long)

Specify generic Long option

FindNearestOptions
with(key: String, value: RawOptions)

Specify RawOptions object

FindNearestOptions
with(key: String, value: String)

Specify generic String option

FindNearestOptions
with(key: String, vararg values: String)

Public constructors

FindNearestOptions

FindNearestOptions()

Creates a new, empty FindNearestOptions object.

Public functions

self

open fun self(options: InternalOptions): FindNearestOptions

withDistanceField

fun withDistanceField(distanceField: Field): FindNearestOptions

Add a field containing the distance to the result.

Parameters
distanceField: Field

The Field that will be added to the result.

Returns
FindNearestOptions

A new FindNearestOptions with the specified distance field.

withDistanceField

fun withDistanceField(distanceField: String?): FindNearestOptions?

Add a field containing the distance to the result.

Parameters
distanceField: String?

The name of the field that will be added to the result.

Returns
FindNearestOptions?

A new FindNearestOptions with the specified distance field.

withLimit

fun withLimit(limit: Long): FindNearestOptions

Specifies the upper bound of documents to return.

Parameters
limit: Long

must be a positive integer.

Returns
FindNearestOptions

A new FindNearestOptions with the specified limit.