( locations: z.infer<typeof realtimeLocationSchema>[] )
| 55 | } |
| 56 | |
| 57 | function buildRealtimeCountryFilter( |
| 58 | locations: z.infer<typeof realtimeLocationSchema>[] |
| 59 | ) { |
| 60 | const countries = [ |
| 61 | ...new Set(locations.map((location) => location.country ?? '')), |
| 62 | ]; |
| 63 | |
| 64 | return `coalesce(country, '') IN (${countries |
| 65 | .map((country) => sqlstring.escape(country)) |
| 66 | .join(', ')})`; |
| 67 | } |
| 68 | |
| 69 | function buildRealtimeCityFilter( |
| 70 | locations: z.infer<typeof realtimeLocationSchema>[] |
no test coverage detected