Get the database name

@return string	The database name
768795
public function getDatabase()
    {
        if(!isset($this->_database))
        {
            $query = $this->getObject('lib:database.query.select')
                ->columns('DATABASE()');

            $this->_database = $this->select($query, KDatabase::FETCH_FIELD);
        }
        return $this->_database;
    }
1071282
public function getDatabase()
    {
        $database = [];

        if (class_exists('O2System\Framework', false)) {
            if (services()->has('database')) {
                $connections = database()->getIterator();

                foreach ($connections as $offset => $connection) {
                    $database[ $offset ] = $connection->getQueries();
                }
            }
        }

        return $database;
    }
1163051
public function getBasename() : string
    {
        $basename = $this->getName();

        if(!empty($this->getExtension())) {
            $basename .= ".".$this->getExtension();
        }

        return $basename;
    }
446006
public function getSchema()
    {
        $this->output->writeln('Load current database schema.');
        $result = [];

        $result['database'] = $this->getDatabaseSchemata($this->dbName);

        $tables = $this->getTables();
        foreach ($tables as $table) {
            $tableName = $table['table_name'];
            $this->output->writeln(sprintf('Table: <info>%s</info>', $tableName));
            $result['tables'][$tableName]['table'] = $table;
            $result['tables'][$tableName]['columns'] = $this->getColumns($tableName);
            $result['tables'][$tableName]['indexes'] = $this->getIndexes($tableName);
            $result['tables'][$tableName]['foreign_keys'] = $this->getForeignKeys($tableName);
        }

        return $result;
    }
680057
public static function getDbo()
	{
		if (!self::$database)
		{
			//get config values

			$host = Config::get()->get('database.host');
			$user = Config::get()->get('database.user');
			$password = Config::get()->get('database.password');
			$database = Config::get()->get('database.name');
			$prefix = Config::get()->get('database.prefix');
			$driver = Config::get()->get('database.driver');
			$debug = Config::get()->get('database.debug');

			//added extra code to prevent error when $driver is incorrect

			$options = array('driver' => $driver, 'host' => $host, 'user' => $user, 'password' => $password, 'database' => $database, 'prefix' => $prefix);

			self::$database = DatabaseFactory::getInstance()->getDriver($driver, $options);

			//get the debug configuration setting
			self::$database->setDebug(Config::get()->get('debug'));
		}
		return self::$database;
	}
301365
public function getSelectName() : ?string
    {
        if (null !== $this->select_name) {
            return $this->select_name . ' as ' . $this->getDBName();
        }
        if (null !== $this->db_name) {
            return $this->db_name;
        }
        return $this->attributes['name'];
    }
100503
protected function getDb()
    {
        return \OxidEsales\Eshop\Core\DatabaseProvider::getDb(\OxidEsales\Eshop\Core\DatabaseProvider::FETCH_MODE_ASSOC);
    }
910970
public function getDatabaseTimezoneName()
    {
        if ($this->databaseTimezoneName === null) {
            $this->databaseTimezoneName = $this->connection->fetchColumn('select @@time_zone') ?: '';
        }

        return $this->databaseTimezoneName;
    }
696707
public function getTable()
    {
        if (isset($this->table)) {
            $table = $this->table;
        } else {
            $table = str_replace('\\', '', snake_case(str_plural(class_basename($this))));
        }

        return $this->getConnection()->db->prefix.$table;
    }
886742
public function getTableName()
    {
        if (null == $this->tableName) {
            $this->tableName = $this->determineTableName();
        }
        return $this->tableName;
    }
801607
public String getDatabase() {

        if (m_databaseKey == null) {
            m_databaseKey = getExtProperty("db.name");
        }
        if (CmsStringUtil.isEmpty(m_databaseKey)) {
            m_databaseKey = getSortedDatabases().get(0);
        }
        return m_databaseKey;
    }
619093
public static function getDefaultDB()
    {
        if (self::$defaultDBName === null) {
            // Determine default database name.
            self::$defaultDBName = isset(self::$configuration['datasources']['default']) && is_scalar(self::$configuration['datasources']['default']) ? self::$configuration['datasources']['default'] : self::DEFAULT_NAME;
        }

        return self::$defaultDBName;
    }
721021
public function getName()
    {
        if (is_null($this->name)) {
            $this->name = is_null($this->getFile()) ? '' : $this->getFile()->getBasename();
        }
        return $this->name;
    }
31526
protected function getMySQLDatabaseByName($databases, $database_name)
    {
        $database_found = collect($databases)->filter(function ($database) use ($database_name) {
            return $database['name'] === $database_name;
        })->first();

        if ($database_found) {
            return $database_found;
        }
        return null;
    }
705418
public function getDbName($id)
    {
        if (!$this->dbNames[$id]) {
            $record = wei()->appRecord()->findById($id);
            $this->dbNames[$id] = $record['name'];
        }

        return $this->dbNames[$id];
    }
693184
protected function getTableName()
    {
        if ($this->tableName) {
            // @todo Clearly needs refactoring. Blame me, I'll burn in hell for this anyways. - Thibaud
            if (trim($this->schemaName) !== '') {
                return $this->schemaName .'.' . $this->tableName;
            }

            return $this->tableName;
        }

        throw new \RuntimeException('Table name is not defined for ' . get_called_class());
    }
1137453
public function getTableName() {
        if(empty($this->trueTableName)) {
            $tableName  = !empty($this->tablePrefix) ? $this->tablePrefix : '';
            if(!empty($this->tableName)) {
                $tableName .= $this->tableName;
            }else{
                $tableName .= parse_name($this->name);
            }
            $this->trueTableName    =   strtolower($tableName);
        }
        return (!empty($this->dbName)?$this->dbName.'.':'').$this->trueTableName;
    }