@logic.side_effect_free
def datastore_search_sql(context, data_dict):
 sql = _get_or_bust(data_dict, 'sql')
 if (not datastore_helpers.is_single_statement(sql)):
  raise p.toolkit.ValidationError({'query': ['Query is not a single statement.']})
 p.toolkit.check_access('datastore_search_sql', context, data_dict)
 data_dict['connection_url'] = config['ckan.datastore.read_url']
 result = db.search_sql(context, data_dict)
 result.pop('id', None)
 result.pop('connection_url')
 return result

@ logic . side_effect_free def datastore_search_sql ( context , data_dict ) : sql = _get_or_bust ( data_dict , 'sql' ) if ( not datastore_helpers . is_single_statement ( sql ) ) : raise p . toolkit . ValidationError ( { 'query' : [ 'Query is not a single statement.' ] } ) p . toolkit . check_access ( 'datastore_search_sql' , context , data_dict ) data_dict [ 'connection_url' ] = config [ 'ckan.datastore.read_url' ] result = db . search_sql ( context , data_dict ) result . pop ( 'id' , None ) result . pop ( 'connection_url' ) return result
execute sql queries on the datastore .