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
7b9474fc
Commit
7b9474fc
authored
Dec 16, 2014
by
Jeroen Thora
Committed by
Steve Müller
Dec 24, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
minor phpdoc fixes in the platform files
parent
374dbb6e
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
34 additions
and
25 deletions
+34
-25
AbstractPlatform.php
lib/Doctrine/DBAL/Platforms/AbstractPlatform.php
+13
-11
DB2Platform.php
lib/Doctrine/DBAL/Platforms/DB2Platform.php
+3
-3
DrizzlePlatform.php
lib/Doctrine/DBAL/Platforms/DrizzlePlatform.php
+2
-1
ReservedKeywordsValidator.php
...ine/DBAL/Platforms/Keywords/ReservedKeywordsValidator.php
+1
-0
MySqlPlatform.php
lib/Doctrine/DBAL/Platforms/MySqlPlatform.php
+3
-1
PostgreSqlPlatform.php
lib/Doctrine/DBAL/Platforms/PostgreSqlPlatform.php
+4
-2
SQLServerPlatform.php
lib/Doctrine/DBAL/Platforms/SQLServerPlatform.php
+8
-7
No files found.
lib/Doctrine/DBAL/Platforms/AbstractPlatform.php
View file @
7b9474fc
...
...
@@ -164,7 +164,7 @@ abstract class AbstractPlatform
/**
* Sets the EventManager used by the Platform.
*
* @param \Doctrine\Common\EventManager
* @param \Doctrine\Common\EventManager
$eventManager
*/
public
function
setEventManager
(
EventManager
$eventManager
)
{
...
...
@@ -901,7 +901,7 @@ abstract class AbstractPlatform
*/
public
function
getConcatExpression
()
{
return
join
(
' || '
,
func_get_args
());
return
join
(
' || '
,
func_get_args
());
}
/**
...
...
@@ -2253,9 +2253,9 @@ abstract class AbstractPlatform
$default
=
" DEFAULT "
.
$field
[
'default'
];
}
elseif
(
in_array
((
string
)
$field
[
'type'
],
array
(
'DateTime'
,
'DateTimeTz'
))
&&
$field
[
'default'
]
==
$this
->
getCurrentTimestampSQL
())
{
$default
=
" DEFAULT "
.
$this
->
getCurrentTimestampSQL
();
}
elseif
((
string
)
$field
[
'type'
]
==
'Time'
&&
$field
[
'default'
]
==
$this
->
getCurrentTimeSQL
())
{
}
elseif
((
string
)
$field
[
'type'
]
==
'Time'
&&
$field
[
'default'
]
==
$this
->
getCurrentTimeSQL
())
{
$default
=
" DEFAULT "
.
$this
->
getCurrentTimeSQL
();
}
elseif
((
string
)
$field
[
'type'
]
==
'Date'
&&
$field
[
'default'
]
==
$this
->
getCurrentDateSQL
())
{
}
elseif
((
string
)
$field
[
'type'
]
==
'Date'
&&
$field
[
'default'
]
==
$this
->
getCurrentDateSQL
())
{
$default
=
" DEFAULT "
.
$this
->
getCurrentDateSQL
();
}
elseif
((
string
)
$field
[
'type'
]
==
'Boolean'
)
{
$default
=
" DEFAULT '"
.
$this
->
convertBooleans
(
$field
[
'default'
])
.
"'"
;
...
...
@@ -2583,6 +2583,7 @@ abstract class AbstractPlatform
* This method should handle the literal case
*
* @param mixed $item A boolean or an array of them.
*
* @return mixed A boolean database value or an array of them.
*/
public
function
convertBooleans
(
$item
)
...
...
@@ -2621,6 +2622,7 @@ abstract class AbstractPlatform
* Note: if the input is not a boolean the original input might be returned.
*
* @param mixed $item A boolean or an array of them.
*
* @return mixed A boolean database value or an array of them.
*/
public
function
convertBooleansToDatabaseValue
(
$item
)
...
...
@@ -3300,11 +3302,11 @@ abstract class AbstractPlatform
final
public
function
modifyLimitQuery
(
$query
,
$limit
,
$offset
=
null
)
{
if
(
$limit
!==
null
)
{
$limit
=
(
int
)
$limit
;
$limit
=
(
int
)
$limit
;
}
if
(
$offset
!==
null
)
{
$offset
=
(
int
)
$offset
;
$offset
=
(
int
)
$offset
;
if
(
$offset
<
0
)
{
throw
new
DBALException
(
"LIMIT argument offset=
$offset
is not valid"
);
...
...
lib/Doctrine/DBAL/Platforms/DB2Platform.php
View file @
7b9474fc
...
...
@@ -703,7 +703,7 @@ class DB2Platform extends AbstractPlatform
}
if
(
isset
(
$field
[
'version'
])
&&
$field
[
'version'
])
{
if
((
string
)
$field
[
'type'
]
!=
"DateTime"
)
{
if
((
string
)
$field
[
'type'
]
!=
"DateTime"
)
{
$field
[
'default'
]
=
"1"
;
}
}
...
...
@@ -744,8 +744,8 @@ class DB2Platform extends AbstractPlatform
return
$query
;
}
$limit
=
(
int
)
$limit
;
$offset
=
(
int
)((
$offset
)
?:
0
);
$limit
=
(
int
)
$limit
;
$offset
=
(
int
)
((
$offset
)
?:
0
);
// Todo OVER() needs ORDER BY data!
$sql
=
'SELECT db22.* FROM (SELECT ROW_NUMBER() OVER() AS DC_ROWNUM, db21.* '
.
...
...
lib/Doctrine/DBAL/Platforms/DrizzlePlatform.php
View file @
7b9474fc
...
...
@@ -101,6 +101,7 @@ class DrizzlePlatform extends AbstractPlatform
if
(
!
empty
(
$columnDef
[
'autoincrement'
]))
{
$autoinc
=
' AUTO_INCREMENT'
;
}
return
$autoinc
;
}
...
...
@@ -205,7 +206,7 @@ class DrizzlePlatform extends AbstractPlatform
// add all indexes
if
(
isset
(
$options
[
'indexes'
])
&&
!
empty
(
$options
[
'indexes'
]))
{
foreach
(
$options
[
'indexes'
]
as
$index
=>
$definition
)
{
foreach
(
$options
[
'indexes'
]
as
$index
=>
$definition
)
{
$queryFields
.=
', '
.
$this
->
getIndexDeclarationSQL
(
$index
,
$definition
);
}
}
...
...
lib/Doctrine/DBAL/Platforms/Keywords/ReservedKeywordsValidator.php
View file @
7b9474fc
...
...
@@ -72,6 +72,7 @@ class ReservedKeywordsValidator implements Visitor
$keywordLists
[]
=
$keywordList
->
getName
();
}
}
return
$keywordLists
;
}
...
...
lib/Doctrine/DBAL/Platforms/MySqlPlatform.php
View file @
7b9474fc
...
...
@@ -106,6 +106,7 @@ class MySqlPlatform extends AbstractPlatform
public
function
getConcatExpression
()
{
$args
=
func_get_args
();
return
'CONCAT('
.
join
(
', '
,
(
array
)
$args
)
.
')'
;
}
...
...
@@ -736,6 +737,7 @@ class MySqlPlatform extends AbstractPlatform
$query
.=
' MATCH '
.
$foreignKey
->
getOption
(
'match'
);
}
$query
.=
parent
::
getAdvancedForeignKeyOptionsSQL
(
$foreignKey
);
return
$query
;
}
...
...
lib/Doctrine/DBAL/Platforms/PostgreSqlPlatform.php
View file @
7b9474fc
...
...
@@ -76,7 +76,7 @@ class PostgreSqlPlatform extends AbstractPlatform
*/
public
function
setUseBooleanTrueFalseStrings
(
$flag
)
{
$this
->
useBooleanTrueFalseStrings
=
(
bool
)
$flag
;
$this
->
useBooleanTrueFalseStrings
=
(
bool
)
$flag
;
}
/**
...
...
@@ -694,6 +694,7 @@ class PostgreSqlPlatform extends AbstractPlatform
if
(
$sequence
instanceof
Sequence
)
{
$sequence
=
$sequence
->
getQuotedName
(
$this
);
}
return
'DROP SEQUENCE '
.
$sequence
.
' CASCADE'
;
}
...
...
@@ -907,6 +908,7 @@ class PostgreSqlPlatform extends AbstractPlatform
if
(
!
empty
(
$field
[
'autoincrement'
]))
{
return
'BIGSERIAL'
;
}
return
'BIGINT'
;
}
...
...
lib/Doctrine/DBAL/Platforms/SQLServerPlatform.php
View file @
7b9474fc
...
...
@@ -272,6 +272,7 @@ class SQLServerPlatform extends AbstractPlatform
if
(
$index
->
hasFlag
(
'nonclustered'
))
{
$flags
=
' NONCLUSTERED'
;
}
return
'ALTER TABLE '
.
$table
.
' ADD PRIMARY KEY'
.
$flags
.
' ('
.
$this
->
getIndexFieldDeclarationListSQL
(
$index
->
getQuotedColumns
(
$this
))
.
')'
;
}
...
...
@@ -915,8 +916,8 @@ class SQLServerPlatform extends AbstractPlatform
* Returns the where clause to filter schema and table name in a query.
*
* @param string $table The full qualified name of the table.
* @param string $
tableColumn
The name of the column to compare the schema to in the where clause.
* @param string $
schemaColumn
The name of the column to compare the table to in the where clause.
* @param string $
schemaColumn
The name of the column to compare the schema to in the where clause.
* @param string $
tableColumn
The name of the column to compare the table to in the where clause.
*
* @return string
*/
...
...
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