Return connection table name.

@return string
964773
public function getConnectionTableName()
    {
        $type_names = [$this->getSourceTypeName(), $this->getTargetTypeName()];
        sort($type_names);

        return implode('_', $type_names);
    }
1108680
public function table()
    {
        if(!isset($this->_table))
            $this->_table = $this->_connection->table($this->_tableName);

        return $this->_table;
    }
684969
public function getConnectionUrl(): string
    {
        if (array_key_exists('unix_socket', $this->connection_params)) {
            return sprintf(
                'mysql://%s@localhost/%s?unix_socket=%s&server_version=%s',
                $this->connection_params['user'] ?? get_current_user(),
                $this->connection_params['dbname'] ?? 'test',
                $this->connection_params['unix_socket'],
                $this->connection_params['server_version'] ?? '5.6'
            );
        }

        return sprintf(
            'mysql://%s:%s@%s:%s/%s?server_version=%s',
            $this->connection_params['user'] ?? get_current_user(),
            $this->connection_params['password'] ?? '',
            $this->connection_params['host'] ?? 'localhost',
            $this->connection_params['port'] ?? 3306,
            $this->connection_params['dbname'] ?? 'test',
            $this->connection_params['server_version'] ?? '5.6'
        );
    }
461802
private function getAllTableNames()
    {
        $handler = $this->databaseConnection->queryAndHandle("SHOW TABLES FROM `" . $this->databaseConnection->getDatabaseName() . "`");
        $tableNames = array();

        if ($handler->getResultSize() > 0) {
            while ($oDatabaseResultRow = $handler->fetchNextResultObject()) {
                $tablesInVariableName = "Tables_in_" . $this->databaseConnection->getDatabaseName();
                // add only tables with the current connection prefix
                if (
                    substr(
                        $oDatabaseResultRow->$tablesInVariableName,
                        0,
                        strlen($this->databaseConnection->getTablePrefix()))
                    == $this->databaseConnection->getTablePrefix()) {

                    array_push($tableNames, $oDatabaseResultRow->$tablesInVariableName);
                }

            }
        }

        return $tableNames;
    }
417178
public function getTableWithFieldNames()
    {
        $table_name = $this->table != null ? $this->table->getTitle() : '?';
        return '[' . $table_name . ']' . '.' . ($this->getName() != null ? $this->getName() : '?');
    }
58884
public function getTableName() {
		if ($this->name === null) {
			$this->name = lcfirst($this->getIntrospectiveData()->name);
		}

		return $this->name;
	}
1071402
public function getTable() {

		if(null === $this -> table) {

			$path  = $this -> getNamespace($this, ['directory', 'entity'], ['directory', 'entity']) . Application :: get(['prefix', 'entity']);
			$path  = str_replace(DIRECTORY_SEPARATOR, '\\', $path);
			$class = new \ReflectionClass(get_class($this));
			
			$this -> table = NameConvert :: toSnakecase(str_replace($path, '', $class -> name));
		}

		return $this -> table;
	}
445952
protected function fetchTableNamesDb() {
        // Get the table names.
        $tables = $this->get(
            new Identifier('sqlite_master'),
            [
                'type' => 'table',
                'name' => [Db::OP_LIKE => $this->escapeLike($this->getPx()).'%']
            ],
            [
                'columns' => ['name']
            ]
        )->fetchAll(PDO::FETCH_COLUMN);

        // Remove internal tables.
        $tables = array_filter($tables, function ($name) {
            return substr($name, 0, 7) !== 'sqlite_';
        });

        return $tables;
    }
196024
protected function dbName()
    {

        $dbName = "default";
        $config = $this::$config;
        $configs = ConnectionManager::config($config);
        if ($configs) {
            $dbName = $configs['connection']['database'];
        }

        return $dbName;
    }
111601
public function getPlatformName()
    {
        static $name = null;
        if (!$name) {
            $name = $this->connection->getDatabasePlatform()->getName();
        }
        return $name;
    }
1374910
public static function defaultConnectionName()
    {
        $namespaceParts = explode('\\', get_called_class());
        $plugin = array_slice(array_reverse($namespaceParts), 3, 2);

        return Inflector::underscore(current($plugin));
    }
281509
public function getTable(): string
    {
        if ($this->table === null) {
            $this->table = $this->getEntityName() . 's';
        }

        return $this->table;
    }
325887
public function getTableName()
    {
        if ($this->table_exists === null && !in_array($this->table_name, $this->connection->getTableNames())) {
            $this->connection->execute('CREATE TABLE ' . $this->connection->escapeTableName($this->table_name) . ' (
                `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
                `migration` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
                `executed_at` datetime NOT NULL,
                PRIMARY KEY (`id`),
                UNIQUE KEY `migration` (`migration`),
                KEY `executed_on` (`executed_at`)
            ) ENGINE=InnoDB CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;');

            $this->table_exists = true;
        }

        return $this->table_name;
    }
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;
    }
56075
public function connectionString()
    {
        if (empty($this->username) || empty($this->password)) {
            return sprintf(
                "mongodb://%s:%d/%s",
                $this->host,
                $this->port,
                $this->db
            );
        }
        return sprintf(
            "mongodb://%s:%s@%s:%d/%s",
            $this->username,
            $this->password,
            $this->host,
            $this->port,
            $this->db
        );
    }
522651
public function getConnectionString()
    {

        $settings = $this->connectionInfo;
        unset( $settings['search_path'] );

        foreach ($settings as $key => &$value) {
            $value = sprintf(
                "%s='%s'",
                $key,
                $value
            );
        }

        return implode(' ', $settings);

    }
1137360
protected function getDatabaseName()
    {
        // Check globals
        global $database;

        if (!empty($database)) {
            return $this->getDatabasePrefix() . $database . $this->getDatabaseSuffix();
        }

        global $databaseConfig;

        if (!empty($databaseConfig['database'])) {
            return $databaseConfig['database']; // Note: Already includes prefix
        }

        // Check environment
        $database = Environment::getEnv('SS_DATABASE_NAME');

        if ($database) {
            return $this->getDatabasePrefix() . $database . $this->getDatabaseSuffix();
        }

        // Auto-detect name
        $chooseName = Environment::getEnv('SS_DATABASE_CHOOSE_NAME');

        if ($chooseName) {
            // Find directory to build name from
            $loopCount = (int)$chooseName;
            $databaseDir = $this->basePath;
            for ($i = 0; $i < $loopCount-1; $i++) {
                $databaseDir = dirname($databaseDir);
            }

            // Build name
            $database = str_replace('.', '', basename($databaseDir));
            $prefix = $this->getDatabasePrefix();

            if ($prefix) {
                $prefix = 'SS_';
            } else {
                // If no prefix, hard-code prefix into database global
                $prefix = '';
                $database = 'SS_' . $database;
            }

            return $prefix . $database;
        }

        // no DB name (may be optional for some connectors)
        return null;
    }