Access values in "where" query

Hey, so I wan't to do some calculations, specifically geo radius. How can I access the data while doing the query?
const res = await db.query.apartments.findMany({
  where: (apartment, { lte }) => {
    const long = apartment.long
    const lat = apartment.lat
    return lte(lat, "15.053018297208397")
  }
})

Or how would I achieve this?
Was this page helpful?