Custom take implementation for LIMIT queries.