protected function checkForMainOffsetOrLimit($sql)
    {
        if ("" !== $this->stripQueryToUnnestedKeyword($sql, $unnested_keyword = 'LIMIT')) {
            throw new \LogicException("Query cannot contain an unnested LIMIT when trying to paginate");
        }

        if ("" !== $this->stripQueryToUnnestedKeyword($sql, $unnested_keyword = 'OFFSET')) {
            throw new \LogicException("Query cannot contain an unnested OFFSET when trying to paginate");
        }

        return true;
    }