Subversion-Projekte lars-tiefland.prado

Revision

Details | Letzte Änderung | Log anzeigen | RSS feed

Revision Autor Zeilennr. Zeile
1 lars 1
<?php
2
/**
3
 * TMssqlTableInfo 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: TMssqlTableInfo.php 1861 2007-04-12 08:05:03Z wei $
10
 * @package System.Data.Common.Mssql
11
 */
12
 
13
/**
14
 * Loads the base TDbTableInfo class and TMssqlTableColumn class.
15
 */
16
Prado::using('System.Data.Common.TDbTableInfo');
17
Prado::using('System.Data.Common.Mssql.TMssqlTableColumn');
18
 
19
/**
20
 * TMssqlTableInfo class provides additional table information for Mssql database.
21
 *
22
 * @author Wei Zhuo <weizho[at]gmail[dot]com>
23
 * @version $Id: TMssqlTableInfo.php 1861 2007-04-12 08:05:03Z wei $
24
 * @package System.Data.Common.Mssql
25
 * @since 3.1
26
 */
27
class TMssqlTableInfo extends TDbTableInfo
28
{
29
	/**
30
	 * @return string name of the schema this column belongs to.
31
	 */
32
	public function getSchemaName()
33
	{
34
		return $this->getInfo('SchemaName');
35
	}
36
 
37
	/**
38
	 * @return string catalog name (database name)
39
	 */
40
	public function getCatalogName()
41
	{
42
		return $this->getInfo('CatalogName');
43
	}
44
 
45
	/**
46
	 * @return string full name of the table, database dependent.
47
	 */
48
	public function getTableFullName()
49
	{
50
		//MSSQL alway returns the catalog, schem and table names.
51
		return '['.$this->getCatalogName().'].['.$this->getSchemaName().'].['.$this->getTableName().']';
52
	}
53
 
54
	/**
55
	 * @param TDbConnection database connection.
56
	 * @return TDbCommandBuilder new command builder
57
	 */
58
	public function createCommandBuilder($connection)
59
	{
60
		Prado::using('System.Data.Common.Mssql.TMssqlCommandBuilder');
61
		return new TMssqlCommandBuilder($connection,$this);
62
	}
63
}
64