File tree Expand file tree Collapse file tree 1 file changed +54
-0
lines changed
tests/Doctrine/Tests/DBAL/Platforms Expand file tree Collapse file tree 1 file changed +54
-0
lines changed Original file line number Diff line number Diff line change @@ -706,6 +706,60 @@ public function testQuotedTableNames()
706
706
$ this ->assertEquals ($ createTriggerStatement , $ sql [3 ]);
707
707
}
708
708
709
+ /**
710
+ * @dataProvider getReturnsGetListTableColumnsSQL
711
+ * @group DBAL-831
712
+ */
713
+ public function testReturnsGetListTableColumnsSQL ($ database , $ expectedSql )
714
+ {
715
+ $ this ->assertEquals ($ expectedSql , $ this ->_platform ->getListTableColumnsSQL ('"test" ' , $ database ));
716
+ }
717
+
718
+ public function getReturnsGetListTableColumnsSQL ()
719
+ {
720
+ return array (
721
+ array (
722
+ null ,
723
+ "SELECT c.*,
724
+ (
725
+ SELECT d.comments
726
+ FROM user_col_comments d
727
+ WHERE d.TABLE_NAME = c.TABLE_NAME
728
+ AND d.COLUMN_NAME = c.COLUMN_NAME
729
+ ) AS comments
730
+ FROM user_tab_columns c
731
+ WHERE c.table_name = 'test'
732
+ ORDER BY c.column_name "
733
+ ),
734
+ array (
735
+ '/ ' ,
736
+ "SELECT c.*,
737
+ (
738
+ SELECT d.comments
739
+ FROM user_col_comments d
740
+ WHERE d.TABLE_NAME = c.TABLE_NAME
741
+ AND d.COLUMN_NAME = c.COLUMN_NAME
742
+ ) AS comments
743
+ FROM user_tab_columns c
744
+ WHERE c.table_name = 'test'
745
+ ORDER BY c.column_name "
746
+ ),
747
+ array (
748
+ 'scott ' ,
749
+ "SELECT c.*,
750
+ (
751
+ SELECT d.comments
752
+ FROM all_col_comments d
753
+ WHERE d.TABLE_NAME = c.TABLE_NAME
754
+ AND d.COLUMN_NAME = c.COLUMN_NAME
755
+ ) AS comments
756
+ FROM all_tab_columns c
757
+ WHERE c.table_name = 'test' AND c.owner = 'SCOTT'
758
+ ORDER BY c.column_name "
759
+ ),
760
+ );
761
+ }
762
+
709
763
/**
710
764
* {@inheritdoc}
711
765
*/
You can’t perform that action at this time.
0 commit comments