refactor baseSqlGenerator