mirror of
https://github.com/dg/dibi.git
synced 2025-08-10 16:14:57 +02:00
- implemented basic meta/reflection support
This commit is contained in:
@@ -222,6 +222,22 @@ class DibiPdoDriver extends DibiObject implements IDibiDriver
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Returns the connection resource.
|
||||
*
|
||||
* @return PDO
|
||||
*/
|
||||
public function getResource()
|
||||
{
|
||||
return $this->connection;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/********************* SQL ****************d*g**/
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Encodes data for use in an SQL statement.
|
||||
*
|
||||
@@ -312,6 +328,10 @@ class DibiPdoDriver extends DibiObject implements IDibiDriver
|
||||
|
||||
|
||||
|
||||
/********************* result set ****************d*g**/
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Returns the number of rows in a result set.
|
||||
*
|
||||
@@ -380,6 +400,7 @@ class DibiPdoDriver extends DibiObject implements IDibiDriver
|
||||
if ($info === FALSE) {
|
||||
throw new DibiDriverException('Driver does not support meta data.');
|
||||
}
|
||||
$info['nativetype'] = $info['native_type'];
|
||||
$meta[] = $info;
|
||||
}
|
||||
return $meta;
|
||||
@@ -387,18 +408,6 @@ class DibiPdoDriver extends DibiObject implements IDibiDriver
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Returns the connection resource.
|
||||
*
|
||||
* @return PDO
|
||||
*/
|
||||
public function getResource()
|
||||
{
|
||||
return $this->connection;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Returns the result set resource.
|
||||
*
|
||||
@@ -411,12 +420,53 @@ class DibiPdoDriver extends DibiObject implements IDibiDriver
|
||||
|
||||
|
||||
|
||||
/********************* reflection ****************d*g**/
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Gets a information of the current database.
|
||||
*
|
||||
* @return DibiReflection
|
||||
* Returns list of tables.
|
||||
* @return array
|
||||
*/
|
||||
function getDibiReflection()
|
||||
{}
|
||||
public function getTables()
|
||||
{
|
||||
throw new NotImplementedException;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Returns metadata for all columns in a table.
|
||||
* @param string
|
||||
* @return array
|
||||
*/
|
||||
public function getColumns($table)
|
||||
{
|
||||
throw new NotImplementedException;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Returns metadata for all indexes in a table.
|
||||
* @param string
|
||||
* @return array
|
||||
*/
|
||||
public function getIndexes($table)
|
||||
{
|
||||
throw new NotImplementedException;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Returns metadata for all foreign keys in a table.
|
||||
* @param string
|
||||
* @return array
|
||||
*/
|
||||
public function getForeignKeys($table)
|
||||
{
|
||||
throw new NotImplementedException;
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user