Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
D
doctrine-dbal
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Tomáš Trávníček
doctrine-dbal
Commits
0985b38b
Commit
0985b38b
authored
May 15, 2011
by
Benjamin Eberlei
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'DBAL-12'
parents
1862f645
6e5f2278
Changes
7
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
698 additions
and
65 deletions
+698
-65
Connection.php
lib/Doctrine/DBAL/Connection.php
+10
-1
CompositeExpression.php
lib/Doctrine/DBAL/Query/Expression/CompositeExpression.php
+12
-2
ExpressionBuilder.php
lib/Doctrine/DBAL/Query/Expression/ExpressionBuilder.php
+1
-2
QueryBuilder.php
lib/Doctrine/DBAL/Query/QueryBuilder.php
+175
-59
CompositeExpressionTest.php
...e/Tests/DBAL/Query/Expression/CompositeExpressionTest.php
+3
-0
ExpressionBuilderTest.php
...ine/Tests/DBAL/Query/Expression/ExpressionBuilderTest.php
+3
-0
QueryBuilderTest.php
tests/Doctrine/Tests/DBAL/Query/QueryBuilderTest.php
+494
-1
No files found.
lib/Doctrine/DBAL/Connection.php
View file @
0985b38b
...
@@ -33,7 +33,6 @@ use PDO, Closure, Exception,
...
@@ -33,7 +33,6 @@ use PDO, Closure, Exception,
* @license http://www.opensource.org/licenses/lgpl-license.php LGPL
* @license http://www.opensource.org/licenses/lgpl-license.php LGPL
* @link www.doctrine-project.org
* @link www.doctrine-project.org
* @since 2.0
* @since 2.0
* @version $Revision: 3938 $
* @author Guilherme Blanco <guilhermeblanco@hotmail.com>
* @author Guilherme Blanco <guilhermeblanco@hotmail.com>
* @author Jonathan Wage <jonwage@gmail.com>
* @author Jonathan Wage <jonwage@gmail.com>
* @author Roman Borschel <roman@code-factory.org>
* @author Roman Borschel <roman@code-factory.org>
...
@@ -1093,4 +1092,14 @@ class Connection implements DriverConnection
...
@@ -1093,4 +1092,14 @@ class Connection implements DriverConnection
}
}
}
}
}
}
/**
* Create a new instance of a SQL query builder.
*
* @return Query\QueryBuilder
*/
public
function
createQueryBuilder
()
{
return
new
Query\QueryBuilder
(
$this
);
}
}
}
\ No newline at end of file
lib/Doctrine/DBAL/Query/Expression/CompositeExpression.php
View file @
0985b38b
...
@@ -24,7 +24,7 @@ namespace Doctrine\DBAL\Query\Expression;
...
@@ -24,7 +24,7 @@ namespace Doctrine\DBAL\Query\Expression;
*
*
* @license http://www.opensource.org/licenses/lgpl-license.php LGPL
* @license http://www.opensource.org/licenses/lgpl-license.php LGPL
* @link www.doctrine-project.org
* @link www.doctrine-project.org
* @since 2.
0
* @since 2.
1
* @author Guilherme Blanco <guilhermeblanco@hotmail.com>
* @author Guilherme Blanco <guilhermeblanco@hotmail.com>
* @author Benjamin Eberlei <kontakt@beberlei.de>
* @author Benjamin Eberlei <kontakt@beberlei.de>
*/
*/
...
@@ -111,10 +111,20 @@ class CompositeExpression implements \Countable
...
@@ -111,10 +111,20 @@ class CompositeExpression implements \Countable
*/
*/
public
function
__toString
()
public
function
__toString
()
{
{
if
(
$this
->
count
(
)
===
1
)
{
if
(
count
(
$this
->
parts
)
===
1
)
{
return
(
string
)
$this
->
parts
[
0
];
return
(
string
)
$this
->
parts
[
0
];
}
}
return
'('
.
implode
(
') '
.
$this
->
type
.
' ('
,
$this
->
parts
)
.
')'
;
return
'('
.
implode
(
') '
.
$this
->
type
.
' ('
,
$this
->
parts
)
.
')'
;
}
}
/**
* Return type of this composite expression (AND/OR)
*
* @return string
*/
public
function
getType
()
{
return
$this
->
type
;
}
}
}
\ No newline at end of file
lib/Doctrine/DBAL/Query/Expression/ExpressionBuilder.php
View file @
0985b38b
...
@@ -26,8 +26,7 @@ use Doctrine\DBAL\Connection;
...
@@ -26,8 +26,7 @@ use Doctrine\DBAL\Connection;
*
*
* @license http://www.opensource.org/licenses/lgpl-license.php LGPL
* @license http://www.opensource.org/licenses/lgpl-license.php LGPL
* @link www.doctrine-project.com
* @link www.doctrine-project.com
* @since 1.0
* @since 2.1
* @version $Revision$
* @author Guilherme Blanco <guilhermeblanco@hotmail.com>
* @author Guilherme Blanco <guilhermeblanco@hotmail.com>
* @author Benjamin Eberlei <kontakt@beberlei.de>
* @author Benjamin Eberlei <kontakt@beberlei.de>
*/
*/
...
...
lib/Doctrine/DBAL/Query/QueryBuilder.php
View file @
0985b38b
This diff is collapsed.
Click to expand it.
tests/Doctrine/Tests/DBAL/Query/Expression/CompositeExpressionTest.php
View file @
0985b38b
...
@@ -6,6 +6,9 @@ use Doctrine\DBAL\Query\Expression\CompositeExpression;
...
@@ -6,6 +6,9 @@ use Doctrine\DBAL\Query\Expression\CompositeExpression;
require_once
__DIR__
.
'/../../../TestInit.php'
;
require_once
__DIR__
.
'/../../../TestInit.php'
;
/**
* @group DBAL-12
*/
class
CompositeExpressionTest
extends
\Doctrine\Tests\DbalTestCase
class
CompositeExpressionTest
extends
\Doctrine\Tests\DbalTestCase
{
{
public
function
testCount
()
public
function
testCount
()
...
...
tests/Doctrine/Tests/DBAL/Query/Expression/ExpressionBuilderTest.php
View file @
0985b38b
...
@@ -7,6 +7,9 @@ use Doctrine\DBAL\Query\Expression\ExpressionBuilder,
...
@@ -7,6 +7,9 @@ use Doctrine\DBAL\Query\Expression\ExpressionBuilder,
require_once
__DIR__
.
'/../../../TestInit.php'
;
require_once
__DIR__
.
'/../../../TestInit.php'
;
/**
* @group DBAL-12
*/
class
ExpressionBuilderTest
extends
\Doctrine\Tests\DbalTestCase
class
ExpressionBuilderTest
extends
\Doctrine\Tests\DbalTestCase
{
{
protected
$expr
;
protected
$expr
;
...
...
tests/Doctrine/Tests/DBAL/Query/QueryBuilderTest.php
View file @
0985b38b
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment