Skip to content

Need DISTANCE Function #271

@stackasaur

Description

@stackasaur

Is your feature request related to a problem? Please describe.
We should have an easier way to express the DISTANCE function.

Describe the solution you'd like
Something we can initialize so we can use it in both where clause and order by. It should also support binds like other filters.

SOQL.Distance dist = SOQL.distance.of(SObjectField field)
  .between(Location location)
  .mi();

SOQL.Distance dist2 = SOQL.distance.of(String field)
  .between(Decimal latitude, Decimal longitude)
  .km();

SOQL.Distance dist3 = SOQL.distance.of(SObject field)
  .between(SObject field)
  .km();

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request
    No fields configured for Feature.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions