From 0f0d3c62e608287cdf77f1a3239371b521ecb40b Mon Sep 17 00:00:00 2001 From: wei <> Date: Sat, 14 Apr 2007 05:02:29 +0000 Subject: Refactor ActiveRecordGateway to use TDataGatewayCommand --- framework/Data/Common/TDbTableColumn.php | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) (limited to 'framework/Data/Common/TDbTableColumn.php') diff --git a/framework/Data/Common/TDbTableColumn.php b/framework/Data/Common/TDbTableColumn.php index c5c9ac80..6ff2ff46 100644 --- a/framework/Data/Common/TDbTableColumn.php +++ b/framework/Data/Common/TDbTableColumn.php @@ -83,6 +83,14 @@ class TDbTableColumn extends TComponent return $this->getInfo('ColumnName'); } + /** + * @return string name of the column with quoted identifier. + */ + public function getColumnId() + { + return $this->getInfo('ColumnId'); + } + /** * @return string size of the column. */ @@ -92,7 +100,7 @@ class TDbTableColumn extends TComponent } /** - * @return integer zero-based ordinal position of the column in the table. + * @return integer one-based ordinal position of the column in the table. */ public function getColumnIndex() { @@ -139,6 +147,15 @@ class TDbTableColumn extends TComponent return $this->getInfo('NumericScale'); } + public function getMaxiumNumericConstraint() + { + if(($precision=$this->getNumericPrecision())!==null) + { + $scale=$this->getNumericScale(); + return $scale===null ? pow(10,$precision) : pow(10,$precision-$scale); + } + } + /** * @return boolean whether this column is a primary key for the table, default is false. */ @@ -170,6 +187,14 @@ class TDbTableColumn extends TComponent { return $this->getSequenceName()!==null; } + + /** + * @return boolean whether this column is excluded from insert and update. + */ + public function getIsExcluded() + { + return false; + } } ?> \ No newline at end of file -- cgit v1.2.3