Subscribe rss
Blog categories
All | Backendless features
Feature 68: Using SQL queries for geopoint searches
March 17, 2015 by markpiller

Based on my research of the space we are in Backendless is the only mBaaS platform that lets you use SQL queries when searching for data. The geolocation data managed by Backendless is not an exception. A geopoint may include metadata, which is an arbitrary collection of key/value pairs. Geopoints may be searched for using SQL based queries. A query must be the “where” part of a traditional SQL statement. It can reference the metadata properties as if they are table columns.

The example below uses the sample data which can be installed into any Backendless backend. The data is a collection of geo points representing cities around the world. Each geo point contains metadata with the name of the city. The sample below runs the following SQL query:

The query searches for all database where the metadata property name is “city” and the value may be either ‘AUSTIN’ or ‘DALLAS’:

Asynchronous sample (Android and Plain Java):

Synchronous sample (Plain Java only):

The program produces the following output:


Share this post
Tweet about this on TwitterShare on FacebookGoogle+