summaryrefslogtreecommitdiff
path: root/framework/Data/Common/TDbTableColumn.php
diff options
context:
space:
mode:
authorwei <>2007-04-14 05:02:29 +0000
committerwei <>2007-04-14 05:02:29 +0000
commit0f0d3c62e608287cdf77f1a3239371b521ecb40b (patch)
treebd91a9499a946e1667a0e17a9c5a97a9d695c7ce /framework/Data/Common/TDbTableColumn.php
parentb05442bbe751b87998d8500ad8e6b28d652a35db (diff)
Refactor ActiveRecordGateway to use TDataGatewayCommand
Diffstat (limited to 'framework/Data/Common/TDbTableColumn.php')
-rw-r--r--framework/Data/Common/TDbTableColumn.php27
1 files changed, 26 insertions, 1 deletions
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
@@ -84,6 +84,14 @@ class TDbTableColumn extends TComponent
}
/**
+ * @return string name of the column with quoted identifier.
+ */
+ public function getColumnId()
+ {
+ return $this->getInfo('ColumnId');
+ }
+
+ /**
* @return string size of the column.
*/
public function getColumnSize()
@@ -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