Issue #2223951 by damiankloip: Move Sql::getEntityTableInfo() to QueryPluginBase.