&& instead of @> to match overlapping date ranges
This commit is contained in:
parent
10b92cb555
commit
51ef635674
1 changed files with 1 additions and 1 deletions
|
@ -93,7 +93,7 @@ class EventResource(object):
|
|||
SELECT '{"type":"Feature", "properties": '|| (events_tags::jsonb || jsonb_build_object('id',events_id,'createdate',createdate,'lastupdate',lastupdate))::text ||', "geometry":'|| st_asgeojson(st_centroid(geom)) ||' }' as feature
|
||||
FROM events
|
||||
JOIN geo ON (hash=events_geo) """ + event_bbox +"""
|
||||
WHERE events_when @> """+ event_when + event_what + event_type +"""
|
||||
WHERE events_when && """+ event_when + event_what + event_type +"""
|
||||
ORDER BY createdate DESC
|
||||
LIMIT 50;
|
||||
""")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue