Changeset 243

Show
Ignore:
Timestamp:
02/09/07 01:08:40 (2 years ago)
Author:
mikey
Message:

added getDatabase()

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/src/main/php/net/stubbles/rdbms/pdo/stubDatabasePDOConnection.php

    r174 r243  
    289289        } 
    290290    } 
     291     
     292    /** 
     293     * returns the database name (e.g. MySQL or PostgreSQL) 
     294     * 
     295     * @return  string 
     296     */ 
     297    public function getDatabase() 
     298    { 
     299        $dsnParts = explode(':', $this->connectionData->getDSN()); 
     300        return $dsnParts[0]; 
     301    } 
    291302} 
    292303?> 
  • trunk/src/main/php/net/stubbles/rdbms/stubDatabaseConnection.php

    r173 r243  
    8181     * @param   string  $sql            the sql query to use 
    8282     * @param   array   $driverOptions  optional  one or more driver specific options for the call to query() 
    83      * @return  stubDatabaseStatemen
     83     * @return  stubDatabaseResul
    8484     * @throws  stubDatabaseException 
    8585     */ 
     
    104104     */ 
    105105    public function getLastInsertID($name = null); 
     106     
     107    /** 
     108     * returns the database name (e.g. MySQL or PostgreSQL) 
     109     * 
     110     * @return  string 
     111     */ 
     112    public function getDatabase(); 
    106113} 
    107114?>