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?
Or how would I achieve this?
Or how would I achieve this?
const res = await db.query.apartments.findMany({
where: (apartment, { lte }) => {
const long = apartment.long
const lat = apartment.lat
return lte(lat, "15.053018297208397")
}
})