protected function _buildConstraints(array $constraints, $schema = null, $joiner = ' ', $primary = false) {
		$result = '';
		foreach ($constraints as $constraint) {
			if (isset($constraint['type'])) {
				$name = $constraint['type'];
				if ($meta = $this->_constraint($name, $constraint, $schema)) {
					$result .= $joiner . $meta;
				}
				if ($name === 'primary') {
					$primary = false;
				}
			}
		}
		if ($primary) {
			$result .= $joiner . $this->_constraint('primary', ['column' => $primary]);
		}
		return $result;
	}
protected function _buildConstraints(array $constraints, $schema = null, $joiner = ' ', $primary = false) {
		$result = '';
		foreach ($constraints as $constraint) {
			if (isset($constraint['type'])) {
				$name = $constraint['type'];
				if ($meta = $this->_constraint($name, $constraint, $schema)) {
					$result .= $joiner . $meta;
				}
				if ($name === 'primary') {
					$primary = false;
				}
			}
		}
		if ($primary) {
			$result .= $joiner . $this->_constraint('primary', ['column' => $primary]);
		}
		return $result;
	}
protected function _buildConstraints ( array $ constraints , $ schema = null , $ joiner = ' ' , $ primary = false ) { $ result = '' ; foreach ( $ constraints as $ constraint ) { if ( isset ( $ constraint [ 'type' ] ) ) { $ name = $ constraint [ 'type' ] ; if ( $ meta = $ this -> _constraint ( $ name , $ constraint , $ schema ) ) { $ result .= $ joiner . $ meta ; } if ( $ name === 'primary' ) { $ primary = false ; } } } if ( $ primary ) { $ result .= $ joiner . $ this -> _constraint ( 'primary' , [ 'column' => $ primary ] ) ; } return $ result ; }
Helper for building columns constraints

@see lithium\data\soure\Database::createSchema()
@param array $constraints The array of constraints
@param type $schema The schema of the table
@param type $joiner The join character
@return string The SQL constraints
Helper for building columns constraints