Skip to Main Content
HCL Domino Ideas Portal

Welcome to the #dominoforever Product Ideas Forum! The place where you can submit product ideas and enhancement request. We encourage you to participate by voting on, commenting on, and creating new ideas. All new ideas will be evaluated by HCL Product Management & Engineering teams, and the next steps will be communicated. While not all submitted ideas will be executed upon, community feedback will play a key role in influencing which ideas are and when they will be implemented.

For more information and upcoming events around #dominoforever, please visit our Destination Domino Page

Status Under Consideration
Workspace Domino Designer
Created by Guest
Created on Nov 1, 2019

Extend expressions and functions to DQL queries to take advantage of GPS

Latitude and longitude values ​​and information related to the location (such as place names) are registered in nsf as one document.
I want to get the document that is closest to the latitude / longitude obtained by NotesGPSCoodinates class.

The current code prepares a view that displays latitude and longitude in columns, repeats calculating the distance from the first view entry, and holds the document ID with the shortest distance calculated up to the last entry.

Since this code performs distance calculations on the caller side, I know that the more view entries, the more data communication and the less efficient.

In SQL, functions such as SQRT can be used to write expressions. For example, the following code:

SELECT SQRT (POWER ((35.690224 – lat) / 0.0111, 2) + POWER ((139.700089 – lng) / 0.0091, 2)) AS distance FROM geodata ORDER BY distance

If DQL has expressions and functions that can be used in a query like this, it will be possible to efficiently obtain information that is closest to the current location.

  • Attach files
  • Guest
    Reply
    |
    Jan 9, 2020

    1.  Domino is a NoSQL database, so SQL comparisons need to be made in distant analog.

    2. DQL's direction for expression handling is to leverage all the work people have done in Formula Language.  And to continue that work.   The richness of the Formula Language library is competitive with any other expression language in the field.

    3. Given 2, 'form'.field or 'view'.column references would be used in DQL to access the Formula Language code residing therein