/**
  * @param string $table The table name.
  * @param string $database The database name.
  * @param resource $dblink The db connection resource.
  */
 function __construct(DatabaseInfo $database, $name)
 {
     $this->database = $database;
     $this->name = $name;
     $this->conn = $database->getConnection();
     // shortcut because all drivers need this for the queries
     $this->dblink = $this->conn->getResource();
     $this->dbname = $database->getName();
 }
 public function __construct(Connection $conn)
 {
     parent::__construct($conn);
     $dsn = $conn->getDSN();
     if (isset($dsn['schema'])) {
         $this->schema = $dsn['schema'];
     } else {
         // For Changing DB/Schema in Meta Data Interface
         $this->schema = $dsn['username'];
     }
     $this->schema = strtoupper($this->schema);
 }
 public function __construct(Connection $conn)
 {
     parent::__construct($conn);
     $dsn = $conn->getDSN();
     // For Changing DB/Schema in Meta Data Interface
     $this->schema = $dsn['database'];
     // For Oracle Type DBs
     if (!$this->schema) {
         $this->schema = $dsn['username'];
     }
     $this->schema = strtoupper($this->schema);
 }
 /** Test getting the products table */
 public function testGetTable()
 {
     $products = $this->dbi->getTable("products");
     $products2 = $this->dbi->getTable("Products");
     $this->assertEquals($products, $products2, 0, "Expected getTable() to be case-insensitive.");
 }
 public function GetInspector()
 {
     $databaseInfo = new DatabaseInfo($this->Type->Id, $this->HostName, $this->Port == null ? "" : $this->Port, $this->UserName, $this->Password);
     return $databaseInfo->GetInspector();
 }