Get Databases list
@return Renderer
@throws \Exception
484940
public function getAllDatabasesActivity():Renderer
    {
        $file = (array) JL::open(FEnv::get("framework.config.db.file"));
        foreach ($file as $one => $val) {
            $val->remove = $this->generateRoute(
                "iumio_manager_databases_manager_remove",
                array("dbconfiguration" => $one),
                null,
                true
            );
            $val->edit = $this->generateRoute(
                "iumio_manager_databases_manager_edit",
                array("dbconfiguration" => $one),
                null,
                true
            );
            $val->edit_save = $this->generateRoute(
                "iumio_manager_databases_manager_edit_save",
                array("dbconfiguration" => $one),
                null,
                true
            );
        }

        return ((new Renderer())->jsonRenderer(array("code" => 200, "results" => $file)));
    }
1104945
public function getTableList()
	{
		$this->connect();

		// Set the query to get the tables statement.
		$this->setQuery('SELECT name FROM ' . $this->getDatabase() . '.sys.Tables WHERE type = \'U\';');
		$tables = $this->loadColumn();

		return $tables;
	}
870671
public function getTables()
    {
        $this->currentQueryIsMaster = false;
        $stmt = $this->prepare('SHOW TABLES;', $this->rlink);
        $this->execute($stmt);

        $tables = [];
        while ($row = $stmt->fetch(\PDO::FETCH_ASSOC)) {
            $tables[] = $row['Tables_in_' . $this->conf['master']['dbname']];
        }
        return $tables;
    }
541132
public function getDatabases()
    {
        $cmd = array(
            'mysql' => 'SHOW DATABASES',
            'pgsql' => 'SELECT datname FROM pg_catalog.pg_database',
            'mssql|sybase|dblib|sqlsrv|odbc' => 'EXEC SP_HELPDB',
        );
        $query = $this->findQuery($cmd);
        if (!$query) return false;
        $result = $this->db->exec($query);
        if (!is_array($result)) return false;
        foreach($result as &$db)
            if (is_array($db)) $db = array_shift($db);
        return $result;
    }
1132938
def listDatabases(self):
        """"""
        iter = self._jcatalog.listDatabases().toLocalIterator()
        databases = []
        while iter.hasNext():
            jdb = iter.next()
            databases.append(Database(
                name=jdb.name(),
                description=jdb.description(),
                locationUri=jdb.locationUri()))
        return databases
1042277
protected function getListPage()
    {
        $conditions = $this->query_filter;
        $conditions['limit'] = $this->data_limit;

        $list = (array) $this->page->getList($conditions);
        $this->prepareListPage($list);
        return $list;
    }
866005
public static function getDatabase()
    {
        $attribute = 'database';

        if (!static::hasClassAttribute($attribute)) {
            $database = Database::getDefault();

            if (!$database) {
                $error = static::error('connection', 'database not found', 'required-for', 6);
                switch (static::getClassConfig('error-mode')) {
                    case 'silent': break;
                    case 'exception': throw new Exception($error);
                    default: trigger_error($error, E_USER_ERROR);
                }
            }

            static::setClassAttribute($attribute, $database);
        }

        return static::getClassAttribute($attribute);
    }
797975
public function getCollection()
    {
        $queueDatabase = $this->database;
        $queueResource = $this->collection;
        $db = $this->getAdapter();

        return $db->$queueDatabase->$queueResource;
    }
913133
public function getDatabaseAdapter() {
        try {           
            if (isset($this->db)) {
                return $this->db;
            }
        
            $config = $this->reader->getDbsConfig();
            if (!isset($config['mysql']) 
                    || !isset($config['mysql']["username"]) 
                    || !isset($config['mysql']["password"]) 
                    || !isset($config['mysql']["host"]) 
                    || !isset($config['mysql']["database"]) ) {
                throw new Exception("Mysql config is not valid!");
            }
            
            $username = $config['mysql']["username"];
            $password = $config['mysql']["password"];
            $host = $config['mysql']["host"];
            $dbname = $config['mysql']["database"];
            
            $this->db = new PDO("mysql:host=$host;dbname=$dbname;charset=utf8", $username, $password);
            $this->db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
            return $this->db;
        } catch (Exception $ex) {
            print("ERROR:>>>>>>>" . $ex->getMessage());
            throw new Exception("Faild to connect mysql db!");
        }
    }
1373253
public function getDatasource()
    {
        $adapter = $this->getAdapter();

        if ($adapter) {
            return $adapter;
        }

        $engine = $this->dsn->engine;

        return 'Database/' . ucfirst($engine);
    }
1051305
public function index(): PaginatedDataInterface
    {
        $builder = $this->createIndexModelBuilder();
        $data    = $this->fetchResources($builder, $builder->getModelClass());

        return $data;
    }
1278433
public function getList(): ListInterface
    {
        $repository = $this->getRepository();

        if (!$repository instanceof AbstractRepository) {
            throw new InvalidRepositoryException(sprintf(
                'Repository must be instance of `%s` instance of `%s` given.',
                AbstractRepository::class, null === $repository ? 'NULL' : get_class($repository)
            ));
        }

        if ('' !== $this->getPageParam()) {
            $this->setPage($this->listRequest->getPage($this->getPageParam(), $this->getPage()));
        }

        if ('' !== $this->getLimitParam()) {
            $this->setLimit($this->listRequest->getLimit($this->getLimitParam(), $this->getLimit()));
        }

        $this->mergeOptions();

        $list = $this->createList();
        $list->load();

        return $list;
    }
933566
public function getList()
    {
        $routeMatch = $this->getEvent()->getRouteMatch();
        $mode = $routeMatch->getParam('mode', false);
        $annee = $routeMatch->getParam('annee', 0);
        $processStateHandler = $this->getProcessStateHandler();
        $processes = $processStateHandler->getRunningProcessList($mode, $annee);
        $response = $this->getResponse();
        $response->getHeaders()->addHeaderLine('Content-Type', 'application/json');
        $serializer = $this->getSerializer();
        $processJson = $serializer->serialize($processes, 'json');
        $response->setContent($processJson);
        return $response;
    }
121147
public function getTables()
    {
        $app = Base::instance();
        $key = 'CACHE.db_tables';
        if ($app->devoid($key)) {
            $result = $this->getConnection()->pdo()
                ->query('SHOW TABLES')->fetchAll(PDO::FETCH_ASSOC);
            $tables = [];
            foreach ($result as $table) {
                $tables[] = array_pop($table);
            }

            $app->set($key, $tables, 60);
        }

        return $app->get($key);
    }
839035
public function getTables($database=null)
    {
        if (empty($database)) $database = $this->getDatabase();
        
        $key  = 'db/tables/' . $database;
        $data = static::getCache()->get($key);
        if (!$data) {
            $data = $this->getAdapter()->getTables($database);
            static::getCache()->set($key, $data);
        }
        return $data;
    }
21215
function GetTables()
    {
        $tables = array();
        $sql = new Sql\Builder($this);
        $tbl = $sql->Table('information_schema.tables', array('TABLE_SCHEMA', 'TABLE_NAME'));
        $cond = $sql->Equals($tbl->Field('TABLE_SCHEMA'), $sql->Value($this->dbName));
        $what = $sql->SelectList($tbl->Field('TABLE_NAME'));

        $select = $sql->Select(true, $what, $tbl, $cond);
        $reader = $this->ExecuteQuery((string) $select);
        while ($reader->Read())
        {
            $tables[] = $reader->ByIndex(0);
        }
        return $tables;
    }
1227874
public static function getList()
    {
        /** @var Model $model */
        $model = new static();
        $fields = [
            trim($model->getPrimaryKey(), '_'),
            trim($model->getDisplayField(), '_')
        ];
        $rows = Sql::createSql($model->getAdapter())
            ->select($model->getTableName(), $fields)
            ->limit(null)
            ->all();
        $list = [];
        list($id, $value) = $fields;
        if (!empty($rows)) {
            foreach ($rows as $row) {
                $list[$row[$id]] = $row[$value];
            }
        }
        return $list;
    }