示例#1
0
文件: Selection.php 项目: krecek/nrsn
	/**
	 * Creates filtered table representation.
	 * @param  string  database table name
	 * @param  NConnection
	 */
	public function __construct($table, NConnection $connection)
	{
		$this->name = $table;
		$this->connection = $connection;
		$reflection = $connection->getDatabaseReflection();
		$this->primary = $reflection->getPrimary($table);
		$this->sqlBuilder = new NSqlBuilder($table, $connection, $reflection);
		$this->cache = $connection->getCache();
	}