Implement search_sql of ckan's datastore