Alvin
Alvin

Reputation: 8509

query geospatial with azure function

I could not find any document on how to use docuementdb geospatial query using azure function using nodejs:

SELECT * 
FROM Areas a 
WHERE ST_WITHIN({'type': 'Point', 'coordinates':[31.9, -4.8]}, a.location)

Upvotes: 0

Views: 123

Answers (2)

Larry Maccherone
Larry Maccherone

Reputation: 9533

DocumentDB provides support for geospatial queries. You can find the documentation here. You can use the queryDocuments() function in the node.js SDK found here.

Upvotes: 1

mathewc
mathewc

Reputation: 13568

Built in binding support for DocumentDB queries is coming soon, but is not yet released. We just wrapped the work up (see issue here in our repo for details). Once this is released, there will be a new sqlQuery binding property that you can set, with full query parameter support, etc.

Upvotes: 1

Related Questions