I use JDatabaseDriver for interaction with database. The next code I took from official Joomla Documentation. Documentation
// Get a db connection.
$db = JFactory::getDbo();
// Create a new query object.
$query = $db->getQuery(true);
$query
->select($db->quoteName(array('user_id', 'profile_key', 'profile_value', 'ordering')))
->from($db->quoteName('#__user_profiles'))
->setLimit('10');
Look at the last row in code above. The setlimit method is no exist in JDatabaseDriver class but it is declared in class - JDatabaseQueryMysqli. Don't I understand the logic or there is some mistake?
In Latest Joomla 3.8.1 setLIMIT does not work properly. You may go for alternative methods like $query->setQuery($query,start,offset);