def _get_links(sr_id, sort, time):
 q = Link._query((Link.c.sr_id == sr_id), sort=db_sort(sort), data=True)
 if (time != 'all'):
  q._filter(db_times[time])
 res = make_results(q)
 return res

def _get_links ( sr_id , sort , time ) : q = Link . _query ( ( Link . c . sr_id == sr_id ) , sort = db_sort ( sort ) , data = True ) if ( time != 'all' ) : q . _filter ( db_times [ time ] ) res = make_results ( q ) return res
general link query for a subreddit .