public function describe($entity, $schema = [], array $meta = []) {
		$database = $this->_config['database'];

		if (!$this->_db) {
			$result = $this->get($database);

			if (isset($result->db_name)) {
				$this->_db = true;
			}
			if (!$this->_db) {
				if (isset($result->error)) {
					if ($result->error === 'not_found') {
						$result = $this->put($database);
					}
				}
				if (isset($result->ok) || isset($result->db_name)) {
					$this->_db = true;
				}
			}
		}
		if (!$this->_db) {
			throw new ConfigException("Database `{$entity}` is not available.");
		}
		return $this->_instance('schema', [['fields' => $schema]]);
	}
public function describe($entity, $schema = [], array $meta = []) {
		$database = $this->_config['database'];

		if (!$this->_db) {
			$result = $this->get($database);

			if (isset($result->db_name)) {
				$this->_db = true;
			}
			if (!$this->_db) {
				if (isset($result->error)) {
					if ($result->error === 'not_found') {
						$result = $this->put($database);
					}
				}
				if (isset($result->ok) || isset($result->db_name)) {
					$this->_db = true;
				}
			}
		}
		if (!$this->_db) {
			throw new ConfigException("Database `{$entity}` is not available.");
		}
		return $this->_instance('schema', [['fields' => $schema]]);
	}
public function describe ( $ entity , $ schema = [ ] , array $ meta = [ ] ) { $ database = $ this -> _config [ 'database' ] ; if ( ! $ this -> _db ) { $ result = $ this -> get ( $ database ) ; if ( isset ( $ result -> db_name ) ) { $ this -> _db = true ; } if ( ! $ this -> _db ) { if ( isset ( $ result -> error ) ) { if ( $ result -> error === 'not_found' ) { $ result = $ this -> put ( $ database ) ; } } if ( isset ( $ result -> ok ) || isset ( $ result -> db_name ) ) { $ this -> _db = true ; } } } if ( ! $ this -> _db ) { throw new ConfigException ( "Database `{$entity}` is not available." ) ; } return $ this -> _instance ( 'schema' , [ [ 'fields' => $ schema ] ] ) ; }
Describe database, create if it does not exist.

@throws ConfigException
@param string $entity
@param array $schema Any schema data pre-defined by the model.
@param array $meta
@return lithium\data\Schema
Describe database create if it does not exist .