Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Unit tests can now run against Akiban with most of them obviously fai…

…ling right now since we have not implemented the majority of functionality.
  • Loading branch information...
commit a9513dac36cd51268878a26c5441404b4091c050 1 parent 556273f
@posulliv authored
View
2  lib/Doctrine/DBAL/Driver/AkibanSrv/AkibanSrvConnection.php
@@ -46,7 +46,7 @@ class AkibanSrvConnection implements \Doctrine\DBAL\Driver\Connection
*/
public function __construct($connectionString)
{
- $this-dbh = pg_connect($connectionString);
+ $this->dbh = pg_connect($connectionString);
if ( ! $this->dbh ) {
throw AkibanSrvException::fromErrorString("Failed to connect to Akiban Server.");
}
View
16 lib/Doctrine/DBAL/Platforms/AkibanServerPlatform.php
@@ -154,8 +154,8 @@ public function getListSequencesSQL($database)
public function getListTablesSQL()
{
- return "SELECT table_name, table_schema
- FROM information_schema.tables WHERE table_schema != 'information_schema';
+ return "SELECT table_name, table_schema " .
+ "FROM information_schema.tables WHERE table_schema != 'information_schema'";
}
public function getListViewsSQL($database)
@@ -191,17 +191,19 @@ public function getListTableIndexesSQL($table, $currentDatabase = null)
// TODO - should $currentDatabase be used?
return "SELECT table_name, index_name, is_unique " .
"FROM information_schema.indexes " .
- "WHERE table_name = ' . $table;
+ "WHERE table_name = '" . $table . "'";
}
public function getListTableColumnsSQL($table, $database = null)
{
+ if ( ! is_null($database)) {
+ $schemaPredicate = "schema_name = '" . $database . "' and ";
+ } else {
+ $schemePredicate = "";
+ }
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 " .
- }
+ "WHERE schema_name != 'information_schema' and " . $schemaPredicate .
"table_name = '" . $table . "'";
}
View
2  lib/Doctrine/DBAL/Platforms/Keywords/AkibanSrvKeywords.php
@@ -26,7 +26,7 @@
* @since 2.3
* @author Padraig O'Sullivan <osullivan.padraig@gmail.com>
*/
-class PostgreSQLKeywords extends KeywordList
+class AkibanSrvKeywords extends KeywordList
{
public function getName()
{
Please sign in to comment.
Something went wrong with that request. Please try again.