Compute nearby-brewery distance in SQL instead of client-side Haversine, and add the spatial index it relies on.

This commit is contained in:
Aaron Po
2026-08-27 02:40:58 -04:00
parent dab7aa2458
commit 7330eabebe
10 changed files with 244 additions and 121 deletions

View File

@@ -2,6 +2,8 @@ namespace Domain.Entities;
public sealed record CoordinateData(double Latitude, double Longitude);
/// <summary>The distance, as computed by the database, from a query's origin point to a brewery.</summary>
public sealed record DistanceInformation(CoordinateData From, double DistanceMetres);
public sealed class BreweryPostLocation
{