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
52929328
Commit
52929328
authored
Jan 21, 2012
by
Benjamin Eberlei
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'DBAL-206' into 2.1.x
parents
6556f045
e134de96
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
10 deletions
+16
-10
OraclePlatform.php
lib/Doctrine/DBAL/Platforms/OraclePlatform.php
+16
-10
No files found.
lib/Doctrine/DBAL/Platforms/OraclePlatform.php
View file @
52929328
...
...
@@ -450,16 +450,13 @@ END;';
cols.position,
r_alc.table_name
\"
references_table
\"
,
r_cols.column_name
\"
foreign_column
\"
FROM
all
_cons_columns cols
LEFT JOIN
all
_constraints alc
FROM
user
_cons_columns cols
LEFT JOIN
user
_constraints alc
ON alc.constraint_name = cols.constraint_name
AND alc.owner = cols.owner
LEFT JOIN all_constraints r_alc
LEFT JOIN user_constraints r_alc
ON alc.r_constraint_name = r_alc.constraint_name
AND alc.r_owner = r_alc.owner
LEFT JOIN all_cons_columns r_cols
LEFT JOIN user_cons_columns r_cols
ON r_alc.constraint_name = r_cols.constraint_name
AND r_alc.owner = r_cols.owner
AND cols.position = r_cols.position
WHERE alc.constraint_name = cols.constraint_name
AND alc.constraint_type = 'R'
...
...
@@ -475,9 +472,18 @@ LEFT JOIN all_cons_columns r_cols
public
function
getListTableColumnsSQL
(
$table
,
$database
=
null
)
{
$table
=
strtoupper
(
$table
);
return
"SELECT c.*, d.comments FROM all_tab_columns c "
.
"INNER JOIN all_col_comments d ON d.OWNER = c.OWNER AND d.TABLE_NAME = c.TABLE_NAME AND d.COLUMN_NAME = c.COLUMN_NAME "
.
"WHERE c.table_name = '"
.
$table
.
"' ORDER BY c.column_name"
;
$tabColumnsTableName
=
"user_tab_columns"
;
$ownerCondition
=
''
;
if
(
null
!==
$database
){
$database
=
strtoupper
(
$database
);
$tabColumnsTableName
=
"all_tab_columns"
;
$ownerCondition
=
"AND c.owner = '"
.
$database
.
"'"
;
}
return
"SELECT c.*, d.comments FROM
$tabColumnsTableName
c "
.
"INNER JOIN user_col_comments d ON d.TABLE_NAME = c.TABLE_NAME AND d.COLUMN_NAME = c.COLUMN_NAME "
.
"WHERE c.table_name = '"
.
$table
.
"' "
.
$ownerCondition
.
" ORDER BY c.column_name"
;
}
/**
...
...
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