diff options
Diffstat (limited to 'framework/Data/Common/TDbTableColumn.php')
-rw-r--r-- | framework/Data/Common/TDbTableColumn.php | 27 |
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 |