Subversion-Projekte lars-tiefland.prado

Revision

Details | Letzte Änderung | Log anzeigen | RSS feed

Revision Autor Zeilennr. Zeile
1 lars 1
<?php
2
/**
3
 * TMssqlTableColumn class file.
4
 *
5
 * @author Wei Zhuo <weizhuo[at]gmail[dot]com>
6
 * @link http://www.pradosoft.com/
7
 * @copyright Copyright &copy; 2005-2008 PradoSoft
8
 * @license http://www.pradosoft.com/license/
9
 * @version $Id: TMssqlTableColumn.php 1863 2007-04-12 12:43:49Z wei $
10
 * @package System.Data.Common.Mssql
11
 */
12
 
13
/**
14
 * Load common TDbTableCommon class.
15
 */
16
Prado::using('System.Data.Common.TDbTableColumn');
17
 
18
/**
19
 * Describes the column metadata of the schema for a Mssql database table.
20
 *
21
 * @author Wei Zhuo <weizho[at]gmail[dot]com>
22
 * @version $Id: TMssqlTableColumn.php 1863 2007-04-12 12:43:49Z wei $
23
 * @package System.Data.Common.Mssql
24
 * @since 3.1
25
 */
26
class TMssqlTableColumn extends TDbTableColumn
27
{
28
	private static $types = array();
29
 
30
	/**
31
	 * Overrides parent implementation, returns PHP type from the db type.
32
	 * @return boolean derived PHP primitive type from the column db type.
33
	 */
34
	public function getPHPType()
35
	{
36
 
37
		return 'string';
38
	}
39
 
40
	/**
41
	 * @return boolean true if the column has identity (auto-increment)
42
	 */
43
	public function getAutoIncrement()
44
	{
45
		return $this->getInfo('AutoIncrement',false);
46
	}
47
 
48
	/**
49
	 * @return boolean true if auto increments.
50
	 */
51
	public function hasSequence()
52
	{
53
		return $this->getAutoIncrement();
54
	}
55
 
56
	/**
57
	 * @return boolean true if db type is 'timestamp'.
58
	 */
59
	public function getIsExcluded()
60
	{
61
		return strtolower($this->getDbType())==='timestamp';
62
	}
63
}
64