From baf1e5edca626368154ec9e6e9b1ff9e39276f07 Mon Sep 17 00:00:00 2001 From: "godzilla80@gmx.net" <> Date: Mon, 8 Feb 2010 08:44:21 +0000 Subject: ENH: Modify TDbTableInfo::getColumnNames() to store result in private class member --- HISTORY | 1 + framework/Data/Common/TDbTableInfo.php | 24 ++++++++++++++++-------- 2 files changed, 17 insertions(+), 8 deletions(-) diff --git a/HISTORY b/HISTORY index 8754d41b..95db4e0a 100644 --- a/HISTORY +++ b/HISTORY @@ -24,6 +24,7 @@ ENH: Add property ClientScriptManagerClass to TPageService and releated changes ENH: Always render clientside counterparts of validation control even if not enabled, but pass-through Enabled property, to allow Enabled/Disable of validator on callback. (Yves) EHN: Add property TValidationSummary.ScrollToSummary to server-side control since property exists on client-side. (Yves) EHN: Add property TransactionClass (defaults to System.Data.TDbTransaction) to TDbConnection and modify beginTransaction() (Yves) +ENH: Modify TDbTableInfo::getColumnNames() to store result in private class member (Yves) ENH: Issue#215 - Add ClientSide property to TDropContainer (googlenew at pcforum.hu, Christophe) CHG: Issue#218 - Change URL of Javascript Logger (Christophe) diff --git a/framework/Data/Common/TDbTableInfo.php b/framework/Data/Common/TDbTableInfo.php index e2aae3d0..455dbc33 100644 --- a/framework/Data/Common/TDbTableInfo.php +++ b/framework/Data/Common/TDbTableInfo.php @@ -27,7 +27,13 @@ class TDbTableInfo extends TComponent private $_columns; - private $_lowercase; + private $_lowercase; + + /** + * @var null|array + * @since 3.1.7 + */ + private $_names = null; /** * Sets the database table meta data information. @@ -118,11 +124,14 @@ class TDbTableInfo extends TComponent * @return array table column names (identifier quoted) */ public function getColumnNames() - { - $names=array(); - foreach($this->getColumns() as $column) - $names[] = $column->getColumnName(); - return $names; + { + if($this->_names===null) + { + $this->_names=array(); + foreach($this->getColumns() as $column) + $this->_names[] = $column->getColumnName(); + } + return $this->_names; } /** @@ -154,5 +163,4 @@ class TDbTableInfo extends TComponent } return $this->_lowercase; } -} - +} \ No newline at end of file -- cgit v1.2.3