public function database(string $database = null): DatabaseInterface
    {
        if (empty($database)) {
            $database = $this->config->getDefaultDatabase();
        }

        //Spiral support ability to link multiple virtual databases together using aliases
        $database = $this->config->resolveAlias($database);

        if (isset($this->databases[$database])) {
            return $this->databases[$database];
        }

        if (!$this->config->hasDatabase($database)) {
            throw new DBALException(
                "Unable to create Database, no presets for '{$database}' found"
            );
        }

        return $this->databases[$database] = $this->makeDatabase(
            $this->config->getDatabase($database)
        );
    }