1
0
mirror of synced 2024-12-14 23:26:04 +03:00
Commit Graph

259 Commits

Author SHA1 Message Date
flip111
228a501014 Made the code prettier :) 2013-10-01 16:53:53 +02:00
flip111
72ae7f5497 Changed GroupBy alias to real column name for all platforms and adjusted failing test accordingly. Has fallback in cases where real column name is not possible (example: Doctrine\Tests\ORM\Query\SelectSqlGenerationTest::testGroupBySupportsIdentificationVariable) 2013-09-30 11:08:42 +02:00
flip111
76fda9562c Update SqlWalker.php fixed wrong GROUP BY clause on SQL Server platform
Without this patch a query would like like:
```
SELECT c0_.Country AS sclr0
FROM Continent c0_ WITH (NOLOCK)
WHERE c0_.Country = 38
GROUP BY sclr0
```
Using the column alias in the GROUP BY clause. However this is not allowed on SQL Server. References:
1. http://stackoverflow.com/a/3841804
2. http://technet.microsoft.com/en-us/library/ms189499.aspx (Logical Processing Order of the SELECT statement)

The correct query should be:
```
SELECT c0_.Country AS sclr0
FROM Continent c0_ WITH (NOLOCK)
WHERE c0_.Country = 38
GROUP BY c0_.Country
```
2013-09-26 14:11:56 +02:00
Guilherme Blanco
cc83ac6ce8 Centralize InputParameter SQL generation. 2013-08-19 00:33:45 -04:00
Guilherme Blanco
43fc8bafa7 DDC-1858 Added missing support to ResultVariable in LikeExpression. 2013-08-18 23:52:32 -04:00
Guilherme Blanco
f674445486 Fixed DDC-2235. 2013-08-16 00:07:06 -04:00
Guilherme Blanco
7f1c1d2b4a Fixed DDC-2506 by manually updating code. Closes PR #708. 2013-08-13 01:07:34 -04:00
Guilherme Blanco
d9c1782a4f Properly fixed DDC-1858. Added support for ResultVariable in NullComparisons while using HavingClause. 2013-08-03 17:38:55 -04:00
Guilherme Blanco
6ef48561ba Merge pull request #688 from sellingsource/master
Implement QuoteStrategy on SqlWalker walkRangeVariableDeclaration
2013-06-12 12:03:24 -07:00
Fabio B. Silva
710d0d1109 Fix DDC-1995 2013-06-07 17:24:05 -04:00
John Brown
4ef043fc3b updating sql walker to use quote strategy in joins 2013-06-07 08:56:58 -07:00
John Brown
afb9c829e2 updating sql walker to use quote strategy in joins 2013-06-07 08:49:49 -07:00
John Brown
77b905eaa8 Implement QuoteStrategy on SqlWalker walkRangeVariableDeclaration
Based on:
http://www.doctrine-project.org/jira/browse/DDC-1845
cb72219b11
2013-06-06 15:08:22 -07:00
Fabio B. Silva
27511374ec Fix DDC-2475 2013-06-04 23:50:43 -04:00
Benjamin Eberlei
fe238d03c8 Merge pull request #618 from FabioBatSilva/DDC-2188
[DDC-2188] Fix arithmetic priority
2013-04-06 07:56:36 -07:00
Pascal Borreli
30b050b44c Fixed typos 2013-04-06 14:31:27 +00:00
Benjamin Eberlei
64b2ecfefc [DDC-2224] Rewrite instanceof feature with parameter needle ClassMetadata breaks caching of queries. 2013-04-04 20:22:48 +02:00
Fabio B. Silva
685c96a1b9 Fix arithmetic priority 2013-03-16 14:33:19 -03:00
Pascal Borreli
a2cd0f5804 Fixed typos 2013-03-11 00:08:58 +00:00
Benjamin Eberlei
8fce78fbfb [DDC-2310] Fix regression introduced in SQL Server lock handling. 2013-02-21 19:02:21 +01:00
Fabio B. Silva
4dcd5a1286 Fix DDC-2234 2013-01-18 23:18:50 -02:00
Benjamin Morel
ba16789843 Fixed documentation for Doctrine\ORM\Query 2012-12-13 16:36:14 +00:00
Benjamin Morel
d4357801a2 Fixed documentation for Doctrine\ORM\Query\Exec 2012-12-13 11:57:46 +00:00
Benjamin Eberlei
8457a9e77e Merge pull request #518 from Fran6co/fix-double-on
regression fix for left joins (double ON)
2012-11-25 03:27:17 -08:00
Francisco Facioni
c84099508f added outer left join 2012-11-22 09:59:44 -03:00
Francisco Facioni
9c59ed5891 regression fix for left joins (double ON) 2012-11-20 12:30:52 -03:00
Lukasz Cybula
2c99ecf586 Extended TreeWalker interface with getQueryComponenets() and setQueryComponent() which are used by the Parser class 2012-11-20 12:42:05 +01:00
Guilherme Blanco
7a895209e3 Merge pull request #502 from gwis/master
Fix for invalid 'double-ON' SQL generation with entity inheritance type JOINED.
2012-11-05 16:15:45 -08:00
Benjamin Morel
88b29a4e59 Fixed errors:
- Typo in variable name in JoinClassPathExpression;
 - Undefined class AST\ArithmeticPrimary (x2);
 - QueryException::invalidPathExpression() expects a PathExpression, not a string.
2012-11-05 14:45:57 -08:00
Gordon Stratton
9e916a2893 Fix for invalid 'double-ON' SQL generation with entity inheritance type JOINED.
In SqlWalker::walkJoin(), SqlWalker::walkRangeVariableDeclaration() can be
called which may produce an 'ON' clause if the entity inheritance type is
JOINED. As walkJoin() may then produce another ON clause, this results in
invalid SQL (e.g. '... ON foo = bar ON (baz = quux) ...' when the inheritance
type is JOINED.

This adds a test and a fix for the problem, by checking for an inheritance type
of JOINED in walkJoin() and using AND instead of ON in the appropriate place.

It seems like this part of the code is begging to be refactored. This is my
first foray into Doctrine internals and can't see a way to do this without
stomping all over the rest of the code, but this section seems ripe for cleanup
by somebody who is familiar.
2012-11-05 01:19:25 -08:00
Vaughn Clayton
ae30ce4596 [DDC-2113] Surround WHERE clause with parens if using SQLFilter 2012-11-02 08:48:57 -04:00
jakoch
d4a6c488ca fixed use statements 2012-10-12 13:53:20 +02:00
Benjamin Eberlei
235ad8e553 [DDC-2052] Add SqlWalker::setQueryComponent() to allow modification of the query component in a custom output walker 2012-10-06 11:16:16 +02:00
Fabio B. Silva
dd984c7319 remove extra line 2012-09-29 16:19:03 -03:00
Fabio B. Silva
1bd6e841bf Fix some CS 2012-09-29 16:19:02 -03:00
Fabio B. Silva
f0403a5394 test literal values 2012-09-29 16:19:00 -03:00
Fabio B. Silva
e5e45a3a5c test sql generation 2012-09-29 16:18:59 -03:00
Fabio B. Silva
af2f556fd3 small refactory 2012-09-29 16:18:59 -03:00
Fabio B. Silva
88f04b5ebd parse nested new operators 2012-09-29 16:18:58 -03:00
Fabio B. Silva
2b403b7dad basic support refactory 2012-09-29 16:18:58 -03:00
Fabio B. Silva
0fbb78e61a basic support, need some code refactory and improvements 2012-09-29 16:18:57 -03:00
Fabio B. Silva
ed89695a8c collect new object parameters 2012-09-29 16:18:57 -03:00
Fabio B. Silva
0e60c50c5e small code refactoring 2012-09-29 16:18:56 -03:00
Fabio B. Silva
0c1a8cd43f sql generation 2012-09-29 16:18:56 -03:00
Fabio B. Silva
7800a7ef3f wrong indentation 2012-06-18 15:31:20 -03:00
Fabio B. Silva
85b6f8dc2f change quote strategy to interface 2012-06-18 14:43:00 -03:00
Fabio B. Silva
b6b35d9482 test quote join variable 2012-06-18 14:43:00 -03:00
Fabio B. Silva
db53b8651c apply quote strategy at sqlwalker 2012-06-18 14:42:53 -03:00
Fabio B. Silva
d49a968d55 tests for DDC-1719 2012-06-18 14:42:53 -03:00
Fabio B. Silva
1bcda5147a inject quote strategy into sql walker 2012-06-18 14:42:53 -03:00