Docs + example of canned SQL query using || concatenation

Closes #321
This commit is contained in:
Simon Willison 2018-06-20 21:54:36 -07:00
commit 3683a6b626
No known key found for this signature in database
GPG key ID: 17E2DEA2588B7F52
3 changed files with 55 additions and 4 deletions

View file

@ -143,7 +143,14 @@ METADATA = {
},
},
'queries': {
'pragma_cache_size': 'PRAGMA cache_size;'
'pragma_cache_size': 'PRAGMA cache_size;',
'neighborhood_search': '''
select neighborhood, facet_cities.name, state
from facetable
join facet_cities on facetable.city_id = facet_cities.id
where neighborhood like '%' || :text || '%'
order by neighborhood;
'''
}
},
}