From 42b9ea233241e6071552adee997d0de87f953e1f Mon Sep 17 00:00:00 2001 From: wei <> Date: Sat, 14 Apr 2007 05:03:19 +0000 Subject: Remove Vendor from ActiveRecord. Now uses Data/Common instead --- .../ActiveRecord/Vendor/TDbMetaDataInspector.php | 82 ---------------------- 1 file changed, 82 deletions(-) delete mode 100644 framework/Data/ActiveRecord/Vendor/TDbMetaDataInspector.php (limited to 'framework/Data/ActiveRecord/Vendor/TDbMetaDataInspector.php') diff --git a/framework/Data/ActiveRecord/Vendor/TDbMetaDataInspector.php b/framework/Data/ActiveRecord/Vendor/TDbMetaDataInspector.php deleted file mode 100644 index 6c23ccb2..00000000 --- a/framework/Data/ActiveRecord/Vendor/TDbMetaDataInspector.php +++ /dev/null @@ -1,82 +0,0 @@ - - * @link http://www.pradosoft.com/ - * @copyright Copyright © 2005-2007 PradoSoft - * @license http://www.pradosoft.com/license/ - * @version $Id$ - * @package System.Data.ActiveRecord.Vendor - */ - -/** - * Base class for database meta data inspectors. - * - * @author Wei Zhuo - * @version $Id$ - * @package System.Data.ActiveRecord.Vendor - * @since 3.1 - */ -abstract class TDbMetaDataInspector -{ - private $_connection; - - public function __construct($conn) - { - $this->setDbConnection($conn); - } - - /** - * @param TDbConnection database connection. - */ - public function setDbConnection($conn) - { - $this->_connection=$conn; - } - - /** - * @return TDbConnection database connection. - */ - public function getDbConnection() - { - return $this->_connection; - } - - /** - * @param string table name - * @return TDbMetaData table meta data. - */ - public function getTableMetaData($table) - { - $keys = $this->getConstraintKeys($table); - $columns = $this->getColumnDefinitions($table); - return $this->createMetaData($table,$columns,$keys['primary'], $keys['foreign']); - } - - /** - * Get the column definitions for given table. - * @param string table name. - * @return array column name value pairs of column meta data. - */ - abstract protected function getColumnDefinitions($table); - - /** - * Gets the primary and foreign key details for the given table. - * @param string table name. - * @return array key value pairs with keys 'primary' and 'foreign'. - */ - abstract protected function getConstraintKeys($table); - - /** - * Create a new instance of meta data. - * @param string table name - * @param array column meta data - * @param array primary key meta data - * @param array foreign key meta data. - * @return TDbMetaData table meta data. - */ - abstract protected function createMetaData($table, $columns, $primary, $foreign); -} - -?> \ No newline at end of file -- cgit v1.2.3