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
3c9bbcf3
Commit
3c9bbcf3
authored
Aug 07, 2012
by
Christophe Coevoet
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed some phpdoc
parent
807e2292
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
35 additions
and
50 deletions
+35
-50
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
Constraint.php
lib/Doctrine/DBAL/Schema/Constraint.php
+1
-1
No files found.
lib/Doctrine/DBAL/Platforms/AbstractPlatform.php
View file @
3c9bbcf3
...
...
@@ -45,7 +45,7 @@ use Doctrine\DBAL\DBALException,
* point of abstraction of platform-specific behaviors, features and SQL dialects.
* They are a passive source of information.
*
*
*
* @link www.doctrine-project.org
* @since 2.0
* @version $Revision: 3938 $
...
...
@@ -109,7 +109,7 @@ abstract class AbstractPlatform
/**
* Holds the KeywordList instance for the current platform.
*
* @var Doctrine\DBAL\Platforms\Keywords\KeywordList
* @var
\
Doctrine\DBAL\Platforms\Keywords\KeywordList
*/
protected
$_keywords
;
...
...
@@ -204,6 +204,7 @@ abstract class AbstractPlatform
* Gets the SQL snippet used to declare a VARCHAR column type.
*
* @param array $field
* @return string
*/
public
function
getVarcharTypeDeclarationSQL
(
array
$field
)
{
...
...
@@ -234,6 +235,12 @@ abstract class AbstractPlatform
return
$this
->
getVarcharTypeDeclarationSQL
(
$field
);
}
/**
* @param int $length
* @param boolean $fixed
* @return string
* @throws \Doctrine\DBAL\DBALException
*/
protected
function
getVarcharTypeDeclarationSQLSnippet
(
$length
,
$fixed
)
{
throw
DBALException
::
notSupported
(
'VARCHARs not supported by Platform.'
);
...
...
@@ -265,6 +272,7 @@ abstract class AbstractPlatform
*
* @param string $dbType
* @param string $doctrineType
* @throws \Doctrine\DBAL\DBALException if the type is not found
*/
public
function
registerDoctrineTypeMapping
(
$dbType
,
$doctrineType
)
{
...
...
@@ -669,7 +677,7 @@ abstract class AbstractPlatform
* @param string $str literal string
* @param string $substr literal string to find
* @param integer $startPos position to start at, beginning of string by default
* @return
integer
* @return
string
*/
public
function
getLocateExpression
(
$str
,
$substr
,
$startPos
=
false
)
{
...
...
@@ -700,9 +708,9 @@ abstract class AbstractPlatform
*/
public
function
getSubstringExpression
(
$value
,
$from
,
$len
=
null
)
{
if
(
$len
===
null
)
if
(
$len
===
null
)
{
return
'SUBSTRING('
.
$value
.
' FROM '
.
$from
.
')'
;
else
{
}
else
{
return
'SUBSTRING('
.
$value
.
' FROM '
.
$from
.
' FOR '
.
$len
.
')'
;
}
}
...
...
@@ -750,7 +758,7 @@ abstract class AbstractPlatform
* These expressions will be matched against the first parameter.
*
* @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
*/
public
function
getInExpression
(
$column
,
$values
)
...
...
@@ -1506,9 +1514,10 @@ abstract class AbstractPlatform
return
$eventArgs
->
isDefaultPrevented
();
}
/**
* @param TableDiff $diff
* @param array $
q
ql
* @param array $
s
ql
* @return boolean
*/
protected
function
onSchemaAlterTable
(
TableDiff
$diff
,
&
$sql
)
...
...
@@ -1889,40 +1898,7 @@ abstract class AbstractPlatform
* 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.
*
* @param array $definition an associative array with the following structure:
* 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
*
* @param \Doctrine\DBAL\Schema\ForeignKeyConstraint $foreignKey
* @return string DBMS specific SQL code portion needed to set the FOREIGN KEY constraint
* of a field declaration.
*/
...
...
@@ -2126,6 +2102,7 @@ abstract class AbstractPlatform
* Get sql for transaction isolation level Connection constant
*
* @param integer $level
* @return string
*/
protected
function
_getTransactionIsolationLevelSQL
(
$level
)
{
...
...
@@ -2196,6 +2173,7 @@ abstract class AbstractPlatform
*
* @param string $table
* @param string $currentDatabase
* @return string
*/
public
function
getListTableIndexesSQL
(
$table
,
$currentDatabase
=
null
)
{
...
...
@@ -2236,6 +2214,7 @@ abstract class AbstractPlatform
* Get sql to set the transaction isolation level
*
* @param integer $level
* @return string
*/
public
function
getSetTransactionIsolationSQL
(
$level
)
{
...
...
@@ -2258,6 +2237,7 @@ abstract class AbstractPlatform
* Obtain DBMS specific SQL to be used to create datetime with timezone offset fields.
*
* @param array $fieldDeclaration
* @return string
*/
public
function
getDateTimeTzTypeDeclarationSQL
(
array
$fieldDeclaration
)
{
...
...
lib/Doctrine/DBAL/Platforms/DB2Platform.php
View file @
3c9bbcf3
...
...
@@ -54,7 +54,9 @@ class DB2Platform extends AbstractPlatform
/**
* 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
)
{
...
...
@@ -66,6 +68,7 @@ class DB2Platform extends AbstractPlatform
* Gets the SQL snippet used to declare a CLOB column type.
*
* @param array $field
* @return string
*/
public
function
getClobTypeDeclarationSQL
(
array
$field
)
{
...
...
@@ -203,6 +206,7 @@ class DB2Platform extends AbstractPlatform
*
* @license New BSD License
* @param string $table
* @param string $database
* @return string
*/
public
function
getListTableColumnsSQL
(
$table
,
$database
=
null
)
...
...
lib/Doctrine/DBAL/Platforms/MySqlPlatform.php
View file @
3c9bbcf3
...
...
@@ -194,6 +194,7 @@ class MySqlPlatform extends AbstractPlatform
* Gets the SQL snippet used to declare a VARCHAR column on the MySql platform.
*
* @params array $field
* @return string
*/
protected
function
getVarcharTypeDeclarationSQLSnippet
(
$length
,
$fixed
)
{
...
...
lib/Doctrine/DBAL/Platforms/OraclePlatform.php
View file @
3c9bbcf3
...
...
@@ -73,6 +73,7 @@ class OraclePlatform extends AbstractPlatform
* - CURRENT_DATE (date, DATE type)
* - CURRENT_TIME (time, TIME type)
*
* @param string $type
* @return string to call a variable with the current timestamp
* @override
*/
...
...
@@ -92,8 +93,8 @@ class OraclePlatform extends AbstractPlatform
*
* @param string $substr literal string to find
* @param string $str literal string
* @param int $
pos
position to start at, beginning of string by default
* @return
integer
* @param int $
startPos
position to start at, beginning of string by default
* @return
string
*/
public
function
getLocateExpression
(
$str
,
$substr
,
$startPos
=
false
)
{
...
...
@@ -319,6 +320,7 @@ class OraclePlatform extends AbstractPlatform
* Gets the SQL snippet used to declare a VARCHAR column on the Oracle platform.
*
* @params array $field
* @return string
* @override
*/
protected
function
getVarcharTypeDeclarationSQLSnippet
(
$length
,
$fixed
)
...
...
@@ -381,6 +383,7 @@ class OraclePlatform extends AbstractPlatform
* @license New BSD License
* @link http://ezcomponents.org/docs/api/trunk/DatabaseSchema/ezcDbSchemaOracleReader.html
* @param string $table
* @param string $currentDatabase
* @return string
*/
public
function
getListTableIndexesSQL
(
$table
,
$currentDatabase
=
null
)
...
...
@@ -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.
*
* @param string $diff->name name of the table that is intended to be changed.
* @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.
* @param \Doctrine\DBAL\Schema\TableDiff $diff
* @return array
*/
public
function
getAlterTableSQL
(
TableDiff
$diff
)
...
...
lib/Doctrine/DBAL/Platforms/SqlitePlatform.php
View file @
3c9bbcf3
...
...
@@ -47,6 +47,7 @@ class SqlitePlatform extends AbstractPlatform
* Return string to call a variable with the current timestamp inside an SQL statement
* There are three special variables for current date and time.
*
* @param string $type
* @return string sqlite function as string
* @override
*/
...
...
lib/Doctrine/DBAL/Schema/Constraint.php
View file @
3c9bbcf3
...
...
@@ -24,7 +24,7 @@ namespace Doctrine\DBAL\Schema;
/**
* Marker interface for contraints
*
*
*
* @link www.doctrine-project.org
* @since 2.0
* @version $Revision$
...
...
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