mirror of
https://github.com/dg/dibi.git
synced 2025-08-04 13:17:58 +02:00
added IDibiDriver::getReflector()
This commit is contained in:
@@ -181,6 +181,17 @@ class DibiMsSqlDriver extends DibiObject implements IDibiDriver, IDibiResultDriv
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Returns the connection reflector.
|
||||
* @return IDibiReflector
|
||||
*/
|
||||
public function getReflector()
|
||||
{
|
||||
throw new NotSupportedException;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/********************* SQL ****************d*g**/
|
||||
|
||||
|
||||
@@ -339,4 +350,5 @@ class DibiMsSqlDriver extends DibiObject implements IDibiDriver, IDibiResultDriv
|
||||
return $this->resultSet;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
@@ -183,6 +183,17 @@ class DibiMsSql2005Driver extends DibiObject implements IDibiDriver, IDibiResult
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Returns the connection reflector.
|
||||
* @return IDibiReflector
|
||||
*/
|
||||
public function getReflector()
|
||||
{
|
||||
throw new NotSupportedException;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/********************* SQL ****************d*g**/
|
||||
|
||||
|
||||
|
@@ -257,6 +257,17 @@ class DibiMySqlDriver extends DibiObject implements IDibiDriver, IDibiResultDriv
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Returns the connection reflector.
|
||||
* @return IDibiReflector
|
||||
*/
|
||||
public function getReflector()
|
||||
{
|
||||
return $this;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/********************* SQL ****************d*g**/
|
||||
|
||||
|
||||
|
@@ -254,6 +254,17 @@ class DibiMySqliDriver extends DibiObject implements IDibiDriver, IDibiResultDri
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Returns the connection reflector.
|
||||
* @return IDibiReflector
|
||||
*/
|
||||
public function getReflector()
|
||||
{
|
||||
return $this;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/********************* SQL ****************d*g**/
|
||||
|
||||
|
||||
|
@@ -200,6 +200,17 @@ class DibiOdbcDriver extends DibiObject implements IDibiDriver, IDibiResultDrive
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Returns the connection reflector.
|
||||
* @return IDibiReflector
|
||||
*/
|
||||
public function getReflector()
|
||||
{
|
||||
return $this;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/********************* SQL ****************d*g**/
|
||||
|
||||
|
||||
|
@@ -197,6 +197,17 @@ class DibiOracleDriver extends DibiObject implements IDibiDriver, IDibiResultDri
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Returns the connection reflector.
|
||||
* @return IDibiReflector
|
||||
*/
|
||||
public function getReflector()
|
||||
{
|
||||
return $this;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/********************* SQL ****************d*g**/
|
||||
|
||||
|
||||
|
@@ -213,6 +213,17 @@ class DibiPdoDriver extends DibiObject implements IDibiDriver, IDibiResultDriver
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Returns the connection reflector.
|
||||
* @return IDibiReflector
|
||||
*/
|
||||
public function getReflector()
|
||||
{
|
||||
throw new NotSupportedException;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/********************* SQL ****************d*g**/
|
||||
|
||||
|
||||
|
@@ -230,6 +230,17 @@ class DibiPostgreDriver extends DibiObject implements IDibiDriver, IDibiResultDr
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Returns the connection reflector.
|
||||
* @return IDibiReflector
|
||||
*/
|
||||
public function getReflector()
|
||||
{
|
||||
return $this;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/********************* SQL ****************d*g**/
|
||||
|
||||
|
||||
|
@@ -204,6 +204,17 @@ class DibiSqliteDriver extends DibiObject implements IDibiDriver, IDibiResultDri
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Returns the connection reflector.
|
||||
* @return IDibiReflector
|
||||
*/
|
||||
public function getReflector()
|
||||
{
|
||||
return $this;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/********************* SQL ****************d*g**/
|
||||
|
||||
|
||||
|
@@ -194,6 +194,17 @@ class DibiSqlite3Driver extends DibiObject implements IDibiDriver, IDibiResultDr
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Returns the connection reflector.
|
||||
* @return IDibiReflector
|
||||
*/
|
||||
public function getReflector()
|
||||
{
|
||||
return $this;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/********************* SQL ****************d*g**/
|
||||
|
||||
|
||||
|
@@ -664,11 +664,8 @@ class DibiConnection extends DibiObject
|
||||
*/
|
||||
public function getDatabaseInfo()
|
||||
{
|
||||
if (!($this->driver instanceof IDibiReflector)) {
|
||||
throw new NotSupportedException('Driver '. get_class($this->driver) . ' has not reflection capabilities.');
|
||||
}
|
||||
$this->connected || $this->connect();
|
||||
return new DibiDatabaseInfo($this->driver, isset($this->config['database']) ? $this->config['database'] : NULL);
|
||||
return new DibiDatabaseInfo($this->driver->getReflector(), isset($this->config['database']) ? $this->config['database'] : NULL);
|
||||
}
|
||||
|
||||
|
||||
|
@@ -151,6 +151,12 @@ interface IDibiDriver
|
||||
*/
|
||||
function getResource();
|
||||
|
||||
/**
|
||||
* Returns the connection reflector.
|
||||
* @return IDibiReflector
|
||||
*/
|
||||
function getReflector();
|
||||
|
||||
/**
|
||||
* Encodes data for use in a SQL statement.
|
||||
* @param string value
|
||||
|
Reference in New Issue
Block a user