public static function createFromQueryBuilder(QueryBuilder $builder, $columnName = 'id')
    {
        return new self(
            $builder->getSQL(),
            $builder->getParameters(),
            $columnName,
            $builder->getConnection(),
            $builder->getParameterTypes()
        );
    }