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
9586b748
Commit
9586b748
authored
May 30, 2009
by
romanb
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[2.0] Refactorings
parent
548e0746
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
19 deletions
+25
-19
AbstractSchemaManager.php
lib/Doctrine/DBAL/Schema/AbstractSchemaManager.php
+25
-19
No files found.
lib/Doctrine/DBAL/Schema/AbstractSchemaManager.php
View file @
9586b748
...
...
@@ -265,7 +265,7 @@ abstract class AbstractSchemaManager
// $table == $index ???
$sql
=
$this
->
_platform
->
getDropIndexSql
(
$table
,
$name
);
return
$this
->
_exec
uteSql
(
$sql
,
'exec'
);
return
$this
->
_exec
Sql
(
$sql
);
}
/**
...
...
@@ -280,7 +280,7 @@ abstract class AbstractSchemaManager
{
$sql
=
$this
->
_platform
->
getDropConstraintSql
(
$table
,
$name
,
$primary
);
return
$this
->
_exec
uteSql
(
$sql
,
'exec'
);
return
$this
->
_exec
Sql
(
$sql
);
}
/**
...
...
@@ -294,7 +294,7 @@ abstract class AbstractSchemaManager
{
$sql
=
$this
->
_platform
->
getDropForeignKeySql
(
$table
,
$name
);
return
$this
->
_exec
uteSql
(
$sql
,
'exec'
);
return
$this
->
_exec
Sql
(
$sql
);
}
/**
...
...
@@ -307,7 +307,7 @@ abstract class AbstractSchemaManager
{
$sql
=
$this
->
_platform
->
getDropSequenceSql
(
$name
);
return
$this
->
_exec
uteSql
(
$sql
,
'exec'
);
return
$this
->
_exec
Sql
(
$sql
);
}
/**
...
...
@@ -316,14 +316,11 @@ abstract class AbstractSchemaManager
* @param string $database The name of the database to create
* @return boolean $result
*/
public
function
createDatabase
(
$database
=
null
)
public
function
createDatabase
(
$database
)
{
if
(
is_null
(
$database
))
{
$database
=
$this
->
_conn
->
getDatabase
();
}
$sql
=
$this
->
_platform
->
getCreateDatabaseSql
(
$database
);
return
$this
->
_exec
uteSql
(
$sql
,
'exec'
);
return
$this
->
_exec
Sql
(
$sql
);
}
/**
...
...
@@ -352,7 +349,7 @@ abstract class AbstractSchemaManager
$sql
=
$this
->
_platform
->
getCreateTableSql
(
$name
,
$columns
,
$options
);
return
$this
->
_exec
uteSql
(
$sql
,
'exec'
);
return
$this
->
_exec
Sql
(
$sql
);
}
/**
...
...
@@ -373,7 +370,7 @@ abstract class AbstractSchemaManager
{
$sql
=
$this
->
_platform
->
getCreateSequenceSql
(
$seqName
,
$start
,
$options
);
return
$this
->
_exec
uteSql
(
$sql
,
'exec'
);
return
$this
->
_exec
Sql
(
$sql
);
}
/**
...
...
@@ -401,7 +398,7 @@ abstract class AbstractSchemaManager
{
$sql
=
$this
->
_platform
->
getCreateConstraintSql
(
$table
,
$name
,
$definition
);
return
$this
->
_exec
uteSql
(
$sql
,
'exec'
);
return
$this
->
_exec
Sql
(
$sql
);
}
/**
...
...
@@ -439,7 +436,7 @@ abstract class AbstractSchemaManager
{
$sql
=
$this
->
_platform
->
getCreateIndexSql
(
$table
,
$name
,
$definition
);
return
$this
->
_exec
uteSql
(
$sql
,
'exec'
);
return
$this
->
_exec
Sql
(
$sql
);
}
/**
...
...
@@ -453,7 +450,7 @@ abstract class AbstractSchemaManager
{
$sql
=
$this
->
_platform
->
getCreateForeignKeySql
(
$table
,
$definition
);
return
$this
->
_exec
uteSql
(
$sql
,
'exec'
);
return
$this
->
_exec
Sql
(
$sql
);
}
/**
...
...
@@ -467,7 +464,7 @@ abstract class AbstractSchemaManager
{
$sql
=
$this
->
_platform
->
getCreateViewSql
(
$name
,
$sql
);
return
$this
->
_exec
uteSql
(
$sql
,
'exec'
);
return
$this
->
_exec
Sql
(
$sql
);
}
/**
...
...
@@ -480,7 +477,7 @@ abstract class AbstractSchemaManager
{
$sql
=
$this
->
_platform
->
getDropViewSql
(
$name
);
return
$this
->
_exec
uteSql
(
$sql
,
'exec'
);
return
$this
->
_exec
Sql
(
$sql
);
}
/**
...
...
@@ -575,7 +572,7 @@ abstract class AbstractSchemaManager
{
$sql
=
$this
->
_platform
->
getAlterTableSql
(
$name
,
$changes
,
$check
);
return
$this
->
_exec
uteSql
(
$sql
,
'exec'
);
return
$this
->
_exec
Sql
(
$sql
);
}
/**
...
...
@@ -856,11 +853,20 @@ abstract class AbstractSchemaManager
return
$tableForeignKey
;
}
protected
function
_executeSql
(
$sql
,
$method
=
'exec'
)
protected
function
_executeSql
(
$sql
)
{
$result
=
true
;
foreach
((
array
)
$sql
as
$query
)
{
$result
=
$this
->
_conn
->
execute
(
$query
);
}
return
$result
;
}
protected
function
_execSql
(
$sql
)
{
$result
=
true
;
foreach
((
array
)
$sql
as
$query
)
{
$result
=
$this
->
_conn
->
$method
(
$query
);
$result
=
$this
->
_conn
->
exec
(
$query
);
}
return
$result
;
}
...
...
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