lithium\data\source\Database::_buildMetas()

protected method

Helper for building columns metas

Parameters

  • array $metas

    The array of column metas.

  • array $names

    If $names is not null only build meta present in $names

  • type $joiner

    The join character

Returns

string

The SQL constraints

Source

	protected function _buildMetas($type, array $metas, $names = null, $joiner = ' ') {
		$result = '';
		$names = $names ? (array) $names : array_keys($metas);
		foreach ($names as $name) {
			$value = isset($metas[$name]) ? $metas[$name] : null;
			if ($value && $meta = $this->_meta($type, $name, $value)) {
				$result .= $joiner . $meta;
			}
		}
		return $result;
	}