Permalink
Browse files

Implemenet getListTableColumnsSQL function.

  • Loading branch information...
1 parent 1df2d9a commit 1736d59353776e12bf08b936c55c614a536d7079 @posulliv committed Aug 13, 2012
Showing with 7 additions and 1 deletion.
  1. +7 −1 lib/Doctrine/DBAL/Platforms/AkibanServerPlatform.php
@@ -197,7 +197,13 @@ public function getListTableIndexesSQL($table, $currentDatabase = null)
public function getListTableColumnsSQL($table, $database = null)
{
- // TODO
+ return "SELECT column_name, type, nullable, character_set_name, collation_name " .
+ "FROM information_schema.columns " .
+ "WHERE schema_name != 'information_schema' and " .
+ if ( ! is_null($database)) {
+ "schema_name = '" . $database . "' and " .
+ }
+ "table_name = '" . $table . "'";
}
/**

0 comments on commit 1736d59

Please sign in to comment.