Subversion-Projekte lars-tiefland.prado

Revision

Details | Letzte Änderung | Log anzeigen | RSS feed

Revision Autor Zeilennr. Zeile
1 lars 1
<?php
2
/**
3
 * TPgsqlTableInfo 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: TPgsqlTableInfo.php 2541 2008-10-21 15:05:13Z qiang.xue $
10
 * @package System.Data.Common.Pgsql
11
 */
12
 
13
/**
14
 * Loads the base TDbTableInfo class and TPgsqlTableColumn class.
15
 */
16
Prado::using('System.Data.Common.TDbTableInfo');
17
Prado::using('System.Data.Common.Pgsql.TPgsqlTableColumn');
18
 
19
/**
20
 * TPgsqlTableInfo class provides additional table information for PostgreSQL database.
21
 *
22
 * @author Wei Zhuo <weizho[at]gmail[dot]com>
23
 * @version $Id: TPgsqlTableInfo.php 2541 2008-10-21 15:05:13Z qiang.xue $
24
 * @package System.Data.Common.Pgsql
25
 * @since 3.1
26
 */
27
class TPgsqlTableInfo 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 full name of the table, database dependent.
39
	 */
40
	public function getTableFullName()
41
	{
42
		if(($schema=$this->getSchemaName())!==null)
43
			return $schema.'.'.$this->getTableName();
44
		else
45
			$this->getTableName();
46
	}
47
 
48
	/**
49
	 * @param TDbConnection database connection.
50
	 * @return TDbCommandBuilder new command builder
51
	 */
52
	public function createCommandBuilder($connection)
53
	{
54
		Prado::using('System.Data.Common.Pgsql.TPgsqlCommandBuilder');
55
		return new TPgsqlCommandBuilder($connection,$this);
56
	}
57
}
58