2017 © Pedro Peláez
 

library doctrine-sqlserver-extensions

SQL Server specific extensions for Doctrine to make life easier

image

brainsonic/doctrine-sqlserver-extensions

SQL Server specific extensions for Doctrine to make life easier

  • Thursday, January 14, 2016
  • by brainsonic
  • Repository
  • 6 Watchers
  • 0 Stars
  • 55 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 6 Forks
  • 0 Open issues
  • 1 Versions
  • 2 % Grown

The README.md

Doctrine SQL Server Extensions

SQL Server specific extensions for Doctrine to make life easier., (*1)

The purpose of this repository is to act as a testbed for Doctrine libraries when using SQL Server., (*2)

Only SQL Server 2005 will be supported, as many of the features require functions that were not available in 2000, and I wish to avoid the use of heavy prepared statements., (*3)

All of the classes in this repo have only been tested in basic scenarios., (*4)

SQL Server Sql Output Walker

This aims to be a drop-in replacement for the standard SqlWalker provided in the ORM. This avoids using doModifyLimitQuery() in SQLServerPlatform.php which is incredibly complex to handle with regex alone., (*5)

There is currently no way to set a default output walker, so the walker must be specified via a hint, (*6)

<?php

$query->setHint(Query::HINT_CUSTOM_OUTPUT_WALKER, 'DoctrineSqlServerExtensions\ORM\Query\AST\SQLServerSqlWalker');

Paginator

The Paginator aims to be a 1:1 replacement for the Paginator included in Doctrine 2.2.x, (*7)

<?php
use DoctrineSqlServerExtensions\ORM\Tools\Pagination\Paginator;

$dql = "SELECT p, c FROM BlogPost p JOIN p.comments c";
$query = $entityManager->createQuery($dql)
                       ->setFirstResult(0)
                       ->setMaxResults(100);

$paginator = new Paginator($query, $fetchJoinCollection = true);

$c = count($paginator);
foreach ($paginator as $post) {
    echo $post->getHeadline() . "\n";
}

The Versions

14/01 2016

dev-master

9999999-dev

SQL Server specific extensions for Doctrine to make life easier

  Sources   Download

The Requires

 

database dbal sqlserver