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
fd452670
Commit
fd452670
authored
Aug 07, 2012
by
Christophe Coevoet
Committed by
Alexander
Aug 14, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed some phpdoc
parent
73beb2f4
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
34 additions
and
49 deletions
+34
-49
AbstractPlatform.php
lib/Doctrine/DBAL/Platforms/AbstractPlatform.php
+21
-41
DB2Platform.php
lib/Doctrine/DBAL/Platforms/DB2Platform.php
+5
-1
MySqlPlatform.php
lib/Doctrine/DBAL/Platforms/MySqlPlatform.php
+1
-0
OraclePlatform.php
lib/Doctrine/DBAL/Platforms/OraclePlatform.php
+6
-7
SqlitePlatform.php
lib/Doctrine/DBAL/Platforms/SqlitePlatform.php
+1
-0
No files found.
lib/Doctrine/DBAL/Platforms/AbstractPlatform.php
View file @
fd452670
...
@@ -45,7 +45,7 @@ use Doctrine\DBAL\DBALException,
...
@@ -45,7 +45,7 @@ use Doctrine\DBAL\DBALException,
* point of abstraction of platform-specific behaviors, features and SQL dialects.
* point of abstraction of platform-specific behaviors, features and SQL dialects.
* They are a passive source of information.
* They are a passive source of information.
*
*
*
*
* @link www.doctrine-project.org
* @link www.doctrine-project.org
* @since 2.0
* @since 2.0
* @version $Revision: 3938 $
* @version $Revision: 3938 $
...
@@ -109,7 +109,7 @@ abstract class AbstractPlatform
...
@@ -109,7 +109,7 @@ abstract class AbstractPlatform
/**
/**
* Holds the KeywordList instance for the current platform.
* Holds the KeywordList instance for the current platform.
*
*
* @var Doctrine\DBAL\Platforms\Keywords\KeywordList
* @var
\
Doctrine\DBAL\Platforms\Keywords\KeywordList
*/
*/
protected
$_keywords
;
protected
$_keywords
;
...
@@ -204,6 +204,7 @@ abstract class AbstractPlatform
...
@@ -204,6 +204,7 @@ abstract class AbstractPlatform
* Gets the SQL snippet used to declare a VARCHAR column type.
* Gets the SQL snippet used to declare a VARCHAR column type.
*
*
* @param array $field
* @param array $field
* @return string
*/
*/
public
function
getVarcharTypeDeclarationSQL
(
array
$field
)
public
function
getVarcharTypeDeclarationSQL
(
array
$field
)
{
{
...
@@ -234,6 +235,12 @@ abstract class AbstractPlatform
...
@@ -234,6 +235,12 @@ abstract class AbstractPlatform
return
$this
->
getVarcharTypeDeclarationSQL
(
$field
);
return
$this
->
getVarcharTypeDeclarationSQL
(
$field
);
}
}
/**
* @param int $length
* @param boolean $fixed
* @return string
* @throws \Doctrine\DBAL\DBALException
*/
protected
function
getVarcharTypeDeclarationSQLSnippet
(
$length
,
$fixed
)
protected
function
getVarcharTypeDeclarationSQLSnippet
(
$length
,
$fixed
)
{
{
throw
DBALException
::
notSupported
(
'VARCHARs not supported by Platform.'
);
throw
DBALException
::
notSupported
(
'VARCHARs not supported by Platform.'
);
...
@@ -265,6 +272,7 @@ abstract class AbstractPlatform
...
@@ -265,6 +272,7 @@ abstract class AbstractPlatform
*
*
* @param string $dbType
* @param string $dbType
* @param string $doctrineType
* @param string $doctrineType
* @throws \Doctrine\DBAL\DBALException if the type is not found
*/
*/
public
function
registerDoctrineTypeMapping
(
$dbType
,
$doctrineType
)
public
function
registerDoctrineTypeMapping
(
$dbType
,
$doctrineType
)
{
{
...
@@ -669,7 +677,7 @@ abstract class AbstractPlatform
...
@@ -669,7 +677,7 @@ abstract class AbstractPlatform
* @param string $str literal string
* @param string $str literal string
* @param string $substr literal string to find
* @param string $substr literal string to find
* @param integer $startPos position to start at, beginning of string by default
* @param integer $startPos position to start at, beginning of string by default
* @return
integer
* @return
string
*/
*/
public
function
getLocateExpression
(
$str
,
$substr
,
$startPos
=
false
)
public
function
getLocateExpression
(
$str
,
$substr
,
$startPos
=
false
)
{
{
...
@@ -700,9 +708,9 @@ abstract class AbstractPlatform
...
@@ -700,9 +708,9 @@ abstract class AbstractPlatform
*/
*/
public
function
getSubstringExpression
(
$value
,
$from
,
$len
=
null
)
public
function
getSubstringExpression
(
$value
,
$from
,
$len
=
null
)
{
{
if
(
$len
===
null
)
if
(
$len
===
null
)
{
return
'SUBSTRING('
.
$value
.
' FROM '
.
$from
.
')'
;
return
'SUBSTRING('
.
$value
.
' FROM '
.
$from
.
')'
;
else
{
}
else
{
return
'SUBSTRING('
.
$value
.
' FROM '
.
$from
.
' FOR '
.
$len
.
')'
;
return
'SUBSTRING('
.
$value
.
' FROM '
.
$from
.
' FOR '
.
$len
.
')'
;
}
}
}
}
...
@@ -750,7 +758,7 @@ abstract class AbstractPlatform
...
@@ -750,7 +758,7 @@ abstract class AbstractPlatform
* These expressions will be matched against the first parameter.
* These expressions will be matched against the first parameter.
*
*
* @param string $column the value that should be matched against
* @param string $column the value that should be matched against
* @param string|array
(string)
$values values that will be matched against $column
* @param string|array
<string>
$values values that will be matched against $column
* @return string logical expression
* @return string logical expression
*/
*/
public
function
getInExpression
(
$column
,
$values
)
public
function
getInExpression
(
$column
,
$values
)
...
@@ -1506,9 +1514,10 @@ abstract class AbstractPlatform
...
@@ -1506,9 +1514,10 @@ abstract class AbstractPlatform
return
$eventArgs
->
isDefaultPrevented
();
return
$eventArgs
->
isDefaultPrevented
();
}
}
/**
/**
* @param TableDiff $diff
* @param TableDiff $diff
* @param array $
q
ql
* @param array $
s
ql
* @return boolean
* @return boolean
*/
*/
protected
function
onSchemaAlterTable
(
TableDiff
$diff
,
&
$sql
)
protected
function
onSchemaAlterTable
(
TableDiff
$diff
,
&
$sql
)
...
@@ -1889,40 +1898,7 @@ abstract class AbstractPlatform
...
@@ -1889,40 +1898,7 @@ abstract class AbstractPlatform
* Obtain DBMS specific SQL code portion needed to set the FOREIGN KEY constraint
* Obtain DBMS specific SQL code portion needed to set the FOREIGN KEY constraint
* of a field declaration to be used in statements like CREATE TABLE.
* of a field declaration to be used in statements like CREATE TABLE.
*
*
* @param array $definition an associative array with the following structure:
* @param \Doctrine\DBAL\Schema\ForeignKeyConstraint $foreignKey
* name optional constraint name
*
* local the local field(s)
*
* foreign the foreign reference field(s)
*
* foreignTable the name of the foreign table
*
* onDelete referential delete action
*
* onUpdate referential update action
*
* deferred deferred constraint checking
*
* The onDelete and onUpdate keys accept the following values:
*
* CASCADE: Delete or update the row from the parent table and automatically delete or
* update the matching rows in the child table. Both ON DELETE CASCADE and ON UPDATE CASCADE are supported.
* Between two tables, you should not define several ON UPDATE CASCADE clauses that act on the same column
* in the parent table or in the child table.
*
* SET NULL: Delete or update the row from the parent table and set the foreign key column or columns in the
* child table to NULL. This is valid only if the foreign key columns do not have the NOT NULL qualifier
* specified. Both ON DELETE SET NULL and ON UPDATE SET NULL clauses are supported.
*
* NO ACTION: In standard SQL, NO ACTION means no action in the sense that an attempt to delete or update a primary
* key value is not allowed to proceed if there is a related foreign key value in the referenced table.
*
* RESTRICT: Rejects the delete or update operation for the parent table. NO ACTION and RESTRICT are the same as
* omitting the ON DELETE or ON UPDATE clause.
*
* SET DEFAULT
*
* @return string DBMS specific SQL code portion needed to set the FOREIGN KEY constraint
* @return string DBMS specific SQL code portion needed to set the FOREIGN KEY constraint
* of a field declaration.
* of a field declaration.
*/
*/
...
@@ -2126,6 +2102,7 @@ abstract class AbstractPlatform
...
@@ -2126,6 +2102,7 @@ abstract class AbstractPlatform
* Get sql for transaction isolation level Connection constant
* Get sql for transaction isolation level Connection constant
*
*
* @param integer $level
* @param integer $level
* @return string
*/
*/
protected
function
_getTransactionIsolationLevelSQL
(
$level
)
protected
function
_getTransactionIsolationLevelSQL
(
$level
)
{
{
...
@@ -2196,6 +2173,7 @@ abstract class AbstractPlatform
...
@@ -2196,6 +2173,7 @@ abstract class AbstractPlatform
*
*
* @param string $table
* @param string $table
* @param string $currentDatabase
* @param string $currentDatabase
* @return string
*/
*/
public
function
getListTableIndexesSQL
(
$table
,
$currentDatabase
=
null
)
public
function
getListTableIndexesSQL
(
$table
,
$currentDatabase
=
null
)
{
{
...
@@ -2236,6 +2214,7 @@ abstract class AbstractPlatform
...
@@ -2236,6 +2214,7 @@ abstract class AbstractPlatform
* Get sql to set the transaction isolation level
* Get sql to set the transaction isolation level
*
*
* @param integer $level
* @param integer $level
* @return string
*/
*/
public
function
getSetTransactionIsolationSQL
(
$level
)
public
function
getSetTransactionIsolationSQL
(
$level
)
{
{
...
@@ -2258,6 +2237,7 @@ abstract class AbstractPlatform
...
@@ -2258,6 +2237,7 @@ abstract class AbstractPlatform
* Obtain DBMS specific SQL to be used to create datetime with timezone offset fields.
* Obtain DBMS specific SQL to be used to create datetime with timezone offset fields.
*
*
* @param array $fieldDeclaration
* @param array $fieldDeclaration
* @return string
*/
*/
public
function
getDateTimeTzTypeDeclarationSQL
(
array
$fieldDeclaration
)
public
function
getDateTimeTzTypeDeclarationSQL
(
array
$fieldDeclaration
)
{
{
...
...
lib/Doctrine/DBAL/Platforms/DB2Platform.php
View file @
fd452670
...
@@ -54,7 +54,9 @@ class DB2Platform extends AbstractPlatform
...
@@ -54,7 +54,9 @@ class DB2Platform extends AbstractPlatform
/**
/**
* Gets the SQL snippet used to declare a VARCHAR column type.
* Gets the SQL snippet used to declare a VARCHAR column type.
*
*
* @param array $field
* @param int $length
* @param boolean $fixed
* @return string
*/
*/
protected
function
getVarcharTypeDeclarationSQLSnippet
(
$length
,
$fixed
)
protected
function
getVarcharTypeDeclarationSQLSnippet
(
$length
,
$fixed
)
{
{
...
@@ -66,6 +68,7 @@ class DB2Platform extends AbstractPlatform
...
@@ -66,6 +68,7 @@ class DB2Platform extends AbstractPlatform
* Gets the SQL snippet used to declare a CLOB column type.
* Gets the SQL snippet used to declare a CLOB column type.
*
*
* @param array $field
* @param array $field
* @return string
*/
*/
public
function
getClobTypeDeclarationSQL
(
array
$field
)
public
function
getClobTypeDeclarationSQL
(
array
$field
)
{
{
...
@@ -203,6 +206,7 @@ class DB2Platform extends AbstractPlatform
...
@@ -203,6 +206,7 @@ class DB2Platform extends AbstractPlatform
*
*
* @license New BSD License
* @license New BSD License
* @param string $table
* @param string $table
* @param string $database
* @return string
* @return string
*/
*/
public
function
getListTableColumnsSQL
(
$table
,
$database
=
null
)
public
function
getListTableColumnsSQL
(
$table
,
$database
=
null
)
...
...
lib/Doctrine/DBAL/Platforms/MySqlPlatform.php
View file @
fd452670
...
@@ -194,6 +194,7 @@ class MySqlPlatform extends AbstractPlatform
...
@@ -194,6 +194,7 @@ class MySqlPlatform extends AbstractPlatform
* Gets the SQL snippet used to declare a VARCHAR column on the MySql platform.
* Gets the SQL snippet used to declare a VARCHAR column on the MySql platform.
*
*
* @params array $field
* @params array $field
* @return string
*/
*/
protected
function
getVarcharTypeDeclarationSQLSnippet
(
$length
,
$fixed
)
protected
function
getVarcharTypeDeclarationSQLSnippet
(
$length
,
$fixed
)
{
{
...
...
lib/Doctrine/DBAL/Platforms/OraclePlatform.php
View file @
fd452670
...
@@ -73,6 +73,7 @@ class OraclePlatform extends AbstractPlatform
...
@@ -73,6 +73,7 @@ class OraclePlatform extends AbstractPlatform
* - CURRENT_DATE (date, DATE type)
* - CURRENT_DATE (date, DATE type)
* - CURRENT_TIME (time, TIME type)
* - CURRENT_TIME (time, TIME type)
*
*
* @param string $type
* @return string to call a variable with the current timestamp
* @return string to call a variable with the current timestamp
* @override
* @override
*/
*/
...
@@ -92,8 +93,8 @@ class OraclePlatform extends AbstractPlatform
...
@@ -92,8 +93,8 @@ class OraclePlatform extends AbstractPlatform
*
*
* @param string $substr literal string to find
* @param string $substr literal string to find
* @param string $str literal string
* @param string $str literal string
* @param int $
pos
position to start at, beginning of string by default
* @param int $
startPos
position to start at, beginning of string by default
* @return
integer
* @return
string
*/
*/
public
function
getLocateExpression
(
$str
,
$substr
,
$startPos
=
false
)
public
function
getLocateExpression
(
$str
,
$substr
,
$startPos
=
false
)
{
{
...
@@ -319,6 +320,7 @@ class OraclePlatform extends AbstractPlatform
...
@@ -319,6 +320,7 @@ class OraclePlatform extends AbstractPlatform
* Gets the SQL snippet used to declare a VARCHAR column on the Oracle platform.
* Gets the SQL snippet used to declare a VARCHAR column on the Oracle platform.
*
*
* @params array $field
* @params array $field
* @return string
* @override
* @override
*/
*/
protected
function
getVarcharTypeDeclarationSQLSnippet
(
$length
,
$fixed
)
protected
function
getVarcharTypeDeclarationSQLSnippet
(
$length
,
$fixed
)
...
@@ -381,6 +383,7 @@ class OraclePlatform extends AbstractPlatform
...
@@ -381,6 +383,7 @@ class OraclePlatform extends AbstractPlatform
* @license New BSD License
* @license New BSD License
* @link http://ezcomponents.org/docs/api/trunk/DatabaseSchema/ezcDbSchemaOracleReader.html
* @link http://ezcomponents.org/docs/api/trunk/DatabaseSchema/ezcDbSchemaOracleReader.html
* @param string $table
* @param string $table
* @param string $currentDatabase
* @return string
* @return string
*/
*/
public
function
getListTableIndexesSQL
(
$table
,
$currentDatabase
=
null
)
public
function
getListTableIndexesSQL
(
$table
,
$currentDatabase
=
null
)
...
@@ -569,11 +572,7 @@ LEFT JOIN user_cons_columns r_cols
...
@@ -569,11 +572,7 @@ LEFT JOIN user_cons_columns r_cols
*
*
* The method returns an array of sql statements, since some platforms need several statements.
* The method returns an array of sql statements, since some platforms need several statements.
*
*
* @param string $diff->name name of the table that is intended to be changed.
* @param \Doctrine\DBAL\Schema\TableDiff $diff
* @param array $changes associative array that contains the details of each type *
* @param boolean $check indicates whether the function should just check if the DBMS driver
* can perform the requested table alterations if the value is true or
* actually perform them otherwise.
* @return array
* @return array
*/
*/
public
function
getAlterTableSQL
(
TableDiff
$diff
)
public
function
getAlterTableSQL
(
TableDiff
$diff
)
...
...
lib/Doctrine/DBAL/Platforms/SqlitePlatform.php
View file @
fd452670
...
@@ -47,6 +47,7 @@ class SqlitePlatform extends AbstractPlatform
...
@@ -47,6 +47,7 @@ class SqlitePlatform extends AbstractPlatform
* Return string to call a variable with the current timestamp inside an SQL statement
* Return string to call a variable with the current timestamp inside an SQL statement
* There are three special variables for current date and time.
* There are three special variables for current date and time.
*
*
* @param string $type
* @return string sqlite function as string
* @return string sqlite function as string
* @override
* @override
*/
*/
...
...
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