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
15bec73c
Unverified
Commit
15bec73c
authored
Jul 09, 2020
by
Sergei Morozov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add missing exception annotation to schema managers
parent
93e61511
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
105 additions
and
8 deletions
+105
-8
AbstractSchemaManager.php
src/Schema/AbstractSchemaManager.php
+82
-3
DB2SchemaManager.php
src/Schema/DB2SchemaManager.php
+3
-0
OracleSchemaManager.php
src/Schema/OracleSchemaManager.php
+4
-0
PostgreSqlSchemaManager.php
src/Schema/PostgreSqlSchemaManager.php
+4
-5
SQLServerSchemaManager.php
src/Schema/SQLServerSchemaManager.php
+4
-0
SqliteSchemaManager.php
src/Schema/SqliteSchemaManager.php
+5
-0
AbstractSchemaSynchronizer.php
src/Schema/Synchronizer/AbstractSchemaSynchronizer.php
+3
-0
No files found.
src/Schema/AbstractSchemaManager.php
View file @
15bec73c
...
...
@@ -3,7 +3,6 @@
namespace
Doctrine\DBAL\Schema
;
use
Doctrine\DBAL\Connection
;
use
Doctrine\DBAL\ConnectionException
;
use
Doctrine\DBAL\DBALException
;
use
Doctrine\DBAL\Event\SchemaColumnDefinitionEventArgs
;
use
Doctrine\DBAL\Event\SchemaIndexDefinitionEventArgs
;
...
...
@@ -93,6 +92,8 @@ abstract class AbstractSchemaManager
* Lists the available databases for this connection.
*
* @return string[]
*
* @throws DBALException
*/
public
function
listDatabases
()
{
...
...
@@ -107,6 +108,8 @@ abstract class AbstractSchemaManager
* Returns a list of all namespaces in the current database.
*
* @return string[]
*
* @throws DBALException
*/
public
function
listNamespaceNames
()
{
...
...
@@ -123,6 +126,8 @@ abstract class AbstractSchemaManager
* @param string|null $database
*
* @return Sequence[]
*
* @throws DBALException
*/
public
function
listSequences
(
$database
=
null
)
{
...
...
@@ -151,6 +156,8 @@ abstract class AbstractSchemaManager
* @param string|null $database
*
* @return Column[]
*
* @throws DBALException
*/
public
function
listTableColumns
(
$table
,
$database
=
null
)
{
...
...
@@ -173,6 +180,8 @@ abstract class AbstractSchemaManager
* @param string $table The name of the table.
*
* @return Index[]
*
* @throws DBALException
*/
public
function
listTableIndexes
(
$table
)
{
...
...
@@ -191,6 +200,8 @@ abstract class AbstractSchemaManager
* @param string|string[] $tableNames
*
* @return bool
*
* @throws DBALException
*/
public
function
tablesExist
(
$tableNames
)
{
...
...
@@ -203,6 +214,8 @@ abstract class AbstractSchemaManager
* Returns a list of all tables in the current database.
*
* @return string[]
*
* @throws DBALException
*/
public
function
listTableNames
()
{
...
...
@@ -236,6 +249,8 @@ abstract class AbstractSchemaManager
* Lists the tables for this connection.
*
* @return Table[]
*
* @throws DBALException
*/
public
function
listTables
()
{
...
...
@@ -253,6 +268,8 @@ abstract class AbstractSchemaManager
* @param string $tableName
*
* @return Table
*
* @throws DBALException
*/
public
function
listTableDetails
(
$tableName
)
{
...
...
@@ -271,6 +288,8 @@ abstract class AbstractSchemaManager
* Lists the views this connection has.
*
* @return View[]
*
* @throws DBALException
*/
public
function
listViews
()
{
...
...
@@ -288,6 +307,8 @@ abstract class AbstractSchemaManager
* @param string|null $database
*
* @return ForeignKeyConstraint[]
*
* @throws DBALException
*/
public
function
listTableForeignKeys
(
$table
,
$database
=
null
)
{
...
...
@@ -311,6 +332,8 @@ abstract class AbstractSchemaManager
* @param string $database The name of the database to drop.
*
* @return void
*
* @throws DBALException
*/
public
function
dropDatabase
(
$database
)
{
...
...
@@ -323,6 +346,8 @@ abstract class AbstractSchemaManager
* @param string $tableName The name of the table to drop.
*
* @return void
*
* @throws DBALException
*/
public
function
dropTable
(
$tableName
)
{
...
...
@@ -336,6 +361,8 @@ abstract class AbstractSchemaManager
* @param Table|string $table The name of the table.
*
* @return void
*
* @throws DBALException
*/
public
function
dropIndex
(
$index
,
$table
)
{
...
...
@@ -352,6 +379,8 @@ abstract class AbstractSchemaManager
* @param Table|string $table The name of the table.
*
* @return void
*
* @throws DBALException
*/
public
function
dropConstraint
(
Constraint
$constraint
,
$table
)
{
...
...
@@ -365,6 +394,8 @@ abstract class AbstractSchemaManager
* @param Table|string $table The name of the table with the foreign key.
*
* @return void
*
* @throws DBALException
*/
public
function
dropForeignKey
(
$foreignKey
,
$table
)
{
...
...
@@ -377,6 +408,8 @@ abstract class AbstractSchemaManager
* @param string $name The name of the sequence to drop.
*
* @return void
*
* @throws DBALException
*/
public
function
dropSequence
(
$name
)
{
...
...
@@ -389,6 +422,8 @@ abstract class AbstractSchemaManager
* @param string $name The name of the view.
*
* @return void
*
* @throws DBALException
*/
public
function
dropView
(
$name
)
{
...
...
@@ -403,6 +438,8 @@ abstract class AbstractSchemaManager
* @param string $database The name of the database to create.
*
* @return void
*
* @throws DBALException
*/
public
function
createDatabase
(
$database
)
{
...
...
@@ -413,6 +450,8 @@ abstract class AbstractSchemaManager
* Creates a new table.
*
* @return void
*
* @throws DBALException
*/
public
function
createTable
(
Table
$table
)
{
...
...
@@ -427,7 +466,7 @@ abstract class AbstractSchemaManager
*
* @return void
*
* @throws
ConnectionException If something fails at database level.
* @throws
DBALException
*/
public
function
createSequence
(
$sequence
)
{
...
...
@@ -440,6 +479,8 @@ abstract class AbstractSchemaManager
* @param Table|string $table
*
* @return void
*
* @throws DBALException
*/
public
function
createConstraint
(
Constraint
$constraint
,
$table
)
{
...
...
@@ -452,6 +493,8 @@ abstract class AbstractSchemaManager
* @param Table|string $table The name of the table on which the index is to be created.
*
* @return void
*
* @throws DBALException
*/
public
function
createIndex
(
Index
$index
,
$table
)
{
...
...
@@ -465,6 +508,8 @@ abstract class AbstractSchemaManager
* @param Table|string $table The name of the table on which the foreign key is to be created.
*
* @return void
*
* @throws DBALException
*/
public
function
createForeignKey
(
ForeignKeyConstraint
$foreignKey
,
$table
)
{
...
...
@@ -475,6 +520,8 @@ abstract class AbstractSchemaManager
* Creates a new view.
*
* @return void
*
* @throws DBALException
*/
public
function
createView
(
View
$view
)
{
...
...
@@ -492,6 +539,8 @@ abstract class AbstractSchemaManager
* @param Table|string $table
*
* @return void
*
* @throws DBALException
*/
public
function
dropAndCreateConstraint
(
Constraint
$constraint
,
$table
)
{
...
...
@@ -505,6 +554,8 @@ abstract class AbstractSchemaManager
* @param Table|string $table The name of the table on which the index is to be created.
*
* @return void
*
* @throws DBALException
*/
public
function
dropAndCreateIndex
(
Index
$index
,
$table
)
{
...
...
@@ -519,6 +570,8 @@ abstract class AbstractSchemaManager
* @param Table|string $table The name of the table on which the foreign key is to be created.
*
* @return void
*
* @throws DBALException
*/
public
function
dropAndCreateForeignKey
(
ForeignKeyConstraint
$foreignKey
,
$table
)
{
...
...
@@ -531,7 +584,7 @@ abstract class AbstractSchemaManager
*
* @return void
*
* @throws
ConnectionException If something fails at database level.
* @throws
DBALException
*/
public
function
dropAndCreateSequence
(
Sequence
$sequence
)
{
...
...
@@ -543,6 +596,8 @@ abstract class AbstractSchemaManager
* Drops and creates a new table.
*
* @return void
*
* @throws DBALException
*/
public
function
dropAndCreateTable
(
Table
$table
)
{
...
...
@@ -556,6 +611,8 @@ abstract class AbstractSchemaManager
* @param string $database The name of the database to create.
*
* @return void
*
* @throws DBALException
*/
public
function
dropAndCreateDatabase
(
$database
)
{
...
...
@@ -567,6 +624,8 @@ abstract class AbstractSchemaManager
* Drops and creates a new view.
*
* @return void
*
* @throws DBALException
*/
public
function
dropAndCreateView
(
View
$view
)
{
...
...
@@ -580,6 +639,8 @@ abstract class AbstractSchemaManager
* Alters an existing tables schema.
*
* @return void
*
* @throws DBALException
*/
public
function
alterTable
(
TableDiff
$tableDiff
)
{
...
...
@@ -597,6 +658,8 @@ abstract class AbstractSchemaManager
* @param string $newName The new name of the table.
*
* @return void
*
* @throws DBALException
*/
public
function
renameTable
(
$name
,
$newName
)
{
...
...
@@ -700,6 +763,8 @@ abstract class AbstractSchemaManager
* @param mixed[][] $sequences
*
* @return Sequence[]
*
* @throws DBALException
*/
protected
function
_getPortableSequencesList
(
$sequences
)
{
...
...
@@ -734,6 +799,8 @@ abstract class AbstractSchemaManager
* @param mixed[][] $tableColumns
*
* @return Column[]
*
* @throws DBALException
*/
protected
function
_getPortableTableColumnList
(
$table
,
$database
,
$tableColumns
)
{
...
...
@@ -773,6 +840,8 @@ abstract class AbstractSchemaManager
* @param mixed[] $tableColumn
*
* @return Column
*
* @throws DBALException
*/
abstract
protected
function
_getPortableTableColumnDefinition
(
$tableColumn
);
...
...
@@ -783,6 +852,8 @@ abstract class AbstractSchemaManager
* @param string|null $tableName
*
* @return Index[]
*
* @throws DBALException
*/
protected
function
_getPortableTableIndexesList
(
$tableIndexRows
,
$tableName
=
null
)
{
...
...
@@ -959,6 +1030,8 @@ abstract class AbstractSchemaManager
* @param string[]|string $sql
*
* @return void
*
* @throws DBALException
*/
protected
function
_execSql
(
$sql
)
{
...
...
@@ -971,6 +1044,8 @@ abstract class AbstractSchemaManager
* Creates a schema instance for the current database.
*
* @return Schema
*
* @throws DBALException
*/
public
function
createSchema
()
{
...
...
@@ -995,6 +1070,8 @@ abstract class AbstractSchemaManager
* Creates the configuration for this schema.
*
* @return SchemaConfig
*
* @throws DBALException
*/
public
function
createSchemaConfig
()
{
...
...
@@ -1031,6 +1108,8 @@ abstract class AbstractSchemaManager
* returns the name of the currently connected database.
*
* @return string[]
*
* @throws DBALException
*/
public
function
getSchemaSearchPaths
()
{
...
...
src/Schema/DB2SchemaManager.php
View file @
15bec73c
...
...
@@ -2,6 +2,7 @@
namespace
Doctrine\DBAL\Schema
;
use
Doctrine\DBAL\DBALException
;
use
Doctrine\DBAL\Platforms\DB2Platform
;
use
Doctrine\DBAL\Types\Type
;
...
...
@@ -37,6 +38,8 @@ class DB2SchemaManager extends AbstractSchemaManager
/**
* {@inheritdoc}
*
* @throws DBALException
*/
protected
function
_getPortableTableColumnDefinition
(
$tableColumn
)
{
...
...
src/Schema/OracleSchemaManager.php
View file @
15bec73c
...
...
@@ -297,6 +297,8 @@ class OracleSchemaManager extends AbstractSchemaManager
* @param string $table
*
* @return bool
*
* @throws DBALException
*/
public
function
dropAutoincrement
(
$table
)
{
...
...
@@ -347,6 +349,8 @@ class OracleSchemaManager extends AbstractSchemaManager
* @param string $user The name of the user to kill sessions for.
*
* @return void
*
* @throws DBALException
*/
private
function
killUserSessions
(
$user
)
{
...
...
src/Schema/PostgreSqlSchemaManager.php
View file @
15bec73c
...
...
@@ -2,6 +2,7 @@
namespace
Doctrine\DBAL\Schema
;
use
Doctrine\DBAL\DBALException
;
use
Doctrine\DBAL\Exception\DriverException
;
use
Doctrine\DBAL\Platforms\PostgreSQL94Platform
;
use
Doctrine\DBAL\Types\Type
;
...
...
@@ -39,6 +40,8 @@ class PostgreSqlSchemaManager extends AbstractSchemaManager
* Gets all the existing schema names.
*
* @return string[]
*
* @throws DBALException
*/
public
function
getSchemaNames
()
{
...
...
@@ -46,11 +49,7 @@ class PostgreSqlSchemaManager extends AbstractSchemaManager
}
/**
* Returns an array of schema search paths.
*
* This is a PostgreSQL only function.
*
* @return string[]
* {@inheritDoc}
*/
public
function
getSchemaSearchPaths
()
{
...
...
src/Schema/SQLServerSchemaManager.php
View file @
15bec73c
...
...
@@ -319,6 +319,8 @@ class SQLServerSchemaManager extends AbstractSchemaManager
* @param string $database The name of the database to close currently active connections for.
*
* @return void
*
* @throws DBALException
*/
private
function
closeActiveDatabaseConnections
(
$database
)
{
...
...
@@ -334,6 +336,8 @@ class SQLServerSchemaManager extends AbstractSchemaManager
/**
* @param string $tableName
*
* @throws DBALException
*/
public
function
listTableDetails
(
$tableName
)
:
Table
{
...
...
src/Schema/SqliteSchemaManager.php
View file @
15bec73c
...
...
@@ -501,6 +501,9 @@ CREATE\sTABLE # Match "CREATE TABLE"
return
$comment
===
''
?
null
:
$comment
;
}
/**
* @throws DBALException
*/
private
function
getCreateTableSQL
(
string
$table
)
:
string
{
$sql
=
$this
->
_conn
->
fetchOne
(
...
...
@@ -528,6 +531,8 @@ SQL
}
/**
* {@inheritDoc}
*
* @param string $tableName
*/
public
function
listTableDetails
(
$tableName
)
:
Table
...
...
src/Schema/Synchronizer/AbstractSchemaSynchronizer.php
View file @
15bec73c
...
...
@@ -3,6 +3,7 @@
namespace
Doctrine\DBAL\Schema\Synchronizer
;
use
Doctrine\DBAL\Connection
;
use
Doctrine\DBAL\DBALException
;
use
Throwable
;
/**
...
...
@@ -37,6 +38,8 @@ abstract class AbstractSchemaSynchronizer implements SchemaSynchronizer
* @param string[] $sql
*
* @return void
*
* @throws DBALException
*/
protected
function
processSql
(
array
$sql
)
{
...
...
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