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
dd708ce9
Commit
dd708ce9
authored
Nov 18, 2010
by
Benjamin Eberlei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
DBAL-64 - More identifier quoting madness. Why am i responsible for this?
parent
135e657a
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
5 deletions
+12
-5
AbstractAsset.php
lib/Doctrine/DBAL/Schema/AbstractAsset.php
+9
-3
Index.php
lib/Doctrine/DBAL/Schema/Index.php
+1
-1
TableTest.php
tests/Doctrine/Tests/DBAL/Schema/TableTest.php
+2
-1
No files found.
lib/Doctrine/DBAL/Schema/AbstractAsset.php
View file @
dd708ce9
...
...
@@ -51,9 +51,15 @@ abstract class AbstractAsset
*/
protected
function
_setName
(
$name
)
{
if
(
strlen
(
$name
)
&&
$name
[
0
]
==
'`'
)
{
if
(
strlen
(
$name
))
{
// TODO: find more elegant way to solve this issue.
if
(
$name
[
0
]
==
'`'
)
{
$this
->
_quoted
=
true
;
$name
=
trim
(
$name
,
'`'
);
}
else
if
(
$name
[
0
]
==
'"'
)
{
$this
->
_quoted
=
true
;
$name
=
trim
(
$name
,
'"'
);
}
}
$this
->
_name
=
$name
;
}
...
...
lib/Doctrine/DBAL/Schema/Index.php
View file @
dd708ce9
...
...
@@ -63,7 +63,7 @@ class Index extends AbstractAsset implements Constraint
protected
function
_addColumn
(
$column
)
{
if
(
is_string
(
$column
))
{
$this
->
_columns
[]
=
strtolower
(
$column
)
;
$this
->
_columns
[]
=
$column
;
}
else
{
throw
new
\InvalidArgumentException
(
"Expecting a string as Index Column"
);
}
...
...
tests/Doctrine/Tests/DBAL/Schema/TableTest.php
View file @
dd708ce9
...
...
@@ -326,7 +326,8 @@ class TableTest extends \PHPUnit_Framework_TestCase
$table
->
addIndex
(
array
(
"ID"
),
"my_idx"
);
$this
->
assertTrue
(
$table
->
hasIndex
(
'my_idx'
));
$this
->
assertEquals
(
array
(
"id"
),
$table
->
getIndex
(
"my_idx"
)
->
getColumns
());
$this
->
assertEquals
(
array
(
"ID"
),
$table
->
getIndex
(
"my_idx"
)
->
getColumns
());
$this
->
assertTrue
(
$table
->
getIndex
(
'my_idx'
)
->
spansColumns
(
array
(
'id'
)));
}
public
function
testAddPrimaryKey_ColumnsAreExplicitlySetToNotNull
()
...
...
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