class SpatialViewQuery implements ViewQueryEncodable (View source)

Represents spatial Couchbase Map/Reduce View query

Methods

array
encode()

Returns associative array, representing the View query.

limit(int $limit)

Limits the result set to a specified number rows.

skip(int $skip)

Skips a number o records rom the beginning of the result set

consistency(int $consistency)

Specifies the mode of updating to perorm before and after executing the query

order(int $order)

Orders the results by key as specified

bbox(array $bbox)

Specifies the bounding box to search within.

startRange(array $range)

Specify start range for query

endRange(array $range)

Specify end range for query

custom(array $customParameters)

Specifies custom options to pass to the server.

Details

array encode()

Returns associative array, representing the View query.

Return Value

array

object which is ready to be serialized.

SpatialViewQuery limit(int $limit)

Limits the result set to a specified number rows.

Parameters

int $limit

maximum number of records in the response

Return Value

SpatialViewQuery

SpatialViewQuery skip(int $skip)

Skips a number o records rom the beginning of the result set

Parameters

int $skip

number of records to skip

Return Value

SpatialViewQuery

SpatialViewQuery consistency(int $consistency)

Specifies the mode of updating to perorm before and after executing the query

Parameters

int $consistency

use constants UPDATE_BEFORE, UPDATE_NONE, UPDATE_AFTER

Return Value

SpatialViewQuery

See also

ViewQuery::UPDATE_BEFORE
ViewQuery::UPDATE_NONE
ViewQuery::UPDATE_AFTER

SpatialViewQuery order(int $order)

Orders the results by key as specified

Parameters

int $order

use contstants ORDER_ASCENDING, ORDER_DESCENDING

Return Value

SpatialViewQuery

SpatialViewQuery bbox(array $bbox)

Specifies the bounding box to search within.

Note, using bbox() is discouraged, startRange/endRange is more flexible and should be preferred.

Parameters

array $bbox

bounding box coordinates expressed as a list of numeric values

Return Value

SpatialViewQuery

See also

SpatialViewQuery::startRange
SpatialViewQuery::endRange

SpatialViewQuery startRange(array $range)

Specify start range for query

Parameters

array $range

Return Value

SpatialViewQuery

See also

https://developer.couchbase.com/documentation/server/current/views/sv-query-parameters.html Querying spatial views

SpatialViewQuery endRange(array $range)

Specify end range for query

Parameters

array $range

Return Value

SpatialViewQuery

See also

https://developer.couchbase.com/documentation/server/current/views/sv-query-parameters.html Querying spatial views

custom(array $customParameters)

Specifies custom options to pass to the server.

Note that these options are expected to be already encoded.