Protected get archive database table list
18645
protected function getArchiveDatabaseTableList($database)
    {
        $databasePath = $this->archivesPath . $database . '/';

        $tables   = Filesystem::getFiles($databasePath, 'php');
        $pregGrep = preg_grep("/\_[0-9]*\.php/", $tables);
        
        return Arrays\RemoveElement::element($tables, $pregGrep);
    }
414666
def getDatabases(self):
        
        cur = self._conn.cursor()
        cur.execute("""SHOW DATABASES;""")
        rows = cur.fetchall()
        if rows:
            return [row[0] for row in rows]
        else:
            return []
12428
public function getTables(): array
	{
		$result = [];
		$tables = $this->connection->getPlatform()->getTables();
		foreach ($tables as $table) {
			$result[] = $table['name'];
		}
		return $result;
	}
970446
protected function loadExistingArchiveIdFromDb()
    {
        $noArchiveFound = array(false, false, false);

        // see isArchiveTemporary()
        $minDatetimeArchiveProcessedUTC = $this->getMinTimeArchiveProcessed();

        if ($this->isArchivingForcedToTrigger()) {
            return $noArchiveFound;
        }

        $idAndVisits = ArchiveSelector::getArchiveIdAndVisits($this->params, $minDatetimeArchiveProcessedUTC);

        if (!$idAndVisits) {
            return $noArchiveFound;
        }

        return $idAndVisits;
    }
495673
@Override
    public ArchiveFormat getArchiveFormat() {
        return getArchive().as(Configurable.class).getConfiguration().getExtensionLoader()
            .getArchiveFormatFromExtensionMapping(actualType);
    }
976712
protected function getArchive()
    {
        if (($fileData = $this->getRemoteContent(self::ARCHIVE_URL)) === false) {
            return false;
        }

        $fileName = Yii::getAlias('@runtime') . DIRECTORY_SEPARATOR . substr(strrchr(self::ARCHIVE_URL, '/'), 1);
        if (@file_put_contents($fileName, $fileData) !== false) {
            return $fileName;
        }

        return false;
    }
1057460
function listCollectionsTransforms(databaseName) {
  const matching = `${databaseName}.`;

  return {
    doc: doc => {
      const index = doc.name.indexOf(matching);
      // Remove database name if available
      if (doc.name && index === 0) {
        doc.name = doc.name.substr(index + matching.length);
      }

      return doc;
    }
  };
}
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;
	}
1358252
function prefs_table($args)
    {
        global $CURR_SECTION;

        $this->add_texts('localization');

        $rcmail        = rcmail::get_instance();
        $dont_override = $rcmail->config->get('dont_override', array());

        if ($args['section'] == 'folders' && !in_array('archive_mbox', $dont_override)) {
            $mbox = $rcmail->config->get('archive_mbox');
            $type = $rcmail->config->get('archive_type');

            // load folders list when needed
            if ($CURR_SECTION) {
                $select = $rcmail->folder_selector(array(
                        'noselection'   => '---',
                        'realnames'     => true,
                        'maxlength'     => 30,
                        'folder_filter' => 'mail',
                        'folder_rights' => 'w',
                        'onchange'      => "if ($(this).val() == 'INBOX') $(this).val('')",
                ));
            }
            else {
                $select = new html_select();
            }

            $args['blocks']['main']['options']['archive_mbox'] = array(
                'title'   => $this->gettext('archivefolder'),
                'content' => $select->show($mbox, array('name' => "_archive_mbox"))
            );

            // add option for structuring the archive folder
            $archive_type = new html_select(array('name' => '_archive_type', 'id' => 'ff_archive_type'));
            $archive_type->add($this->gettext('none'), '');
            $archive_type->add($this->gettext('archivetypeyear'), 'year');
            $archive_type->add($this->gettext('archivetypemonth'), 'month');
            $archive_type->add($this->gettext('archivetypesender'), 'sender');
            $archive_type->add($this->gettext('archivetypefolder'), 'folder');

            $args['blocks']['archive'] = array(
                'name' => rcube::Q($this->gettext('settingstitle')),
                'options' => array('archive_type' => array(
                        'title'   => $this->gettext('archivetype'),
                        'content' => $archive_type->show($type)
                    )
                )
            );
        }
        else if ($args['section'] == 'server' && !in_array('read_on_archive', $dont_override)) {
            $chbox = new html_checkbox(array('name' => '_read_on_archive', 'id' => 'ff_read_on_archive', 'value' => 1));
            $args['blocks']['main']['options']['read_on_archive'] = array(
                'title'   => $this->gettext('readonarchive'),
                'content' => $chbox->show($rcmail->config->get('read_on_archive') ? 1 : 0)
            );
        }

        return $args;
    }
581140
public function getTables()
    {
        if ($this->_tables == self::AUTO_DETECT_TABLES) {
            $tables = $this->_db->show('SHOW TABLES', AnDatabase::FETCH_FIELD_LIST);
            $prefix = $this->_db->getTablePrefix().$this->getIdentifier()->package.'_';
            $schemas = array();
            foreach ($tables as $table) {
                if (strpos($table, $prefix) === 0) {
                    $schemas[] = $table;
                }
            }
        } else {
            $schemas = $this->_tables;
            settype($schemas, 'array');
            $prefix = $this->_db->getTablePrefix();
            $schemas = array_map(function ($table) use ($prefix) {
                return $prefix.$table;
            }, $schemas);
        }

        return $schemas;
    }
140678
public String getTableNames(boolean bAddQuotes)
    {
        if (m_tableName == null)
        {
            String strDatabaseName = "";
            if (this.getDatabaseName() != null)
                if (!this.getDatabaseName().endsWith("_" + this.getDatabaseName()))
                    strDatabaseName = "_" + this.getDatabaseName();
            return Record.formatTableNames(DATABASE_INFO_FILE, bAddQuotes) + strDatabaseName;
        }
        return super.getTableNames(bAddQuotes);
    }
254240
public function getTableList()
	{
		$this->connect();

		/* @type  SqliteQuery  $query */
		$query = $this->getQuery(true);

		$type = 'table';

		$query->select('name');
		$query->from('sqlite_master');
		$query->where('type = :type');
		$query->bind(':type', $type);
		$query->order('name');

		$this->setQuery($query);

		$tables = $this->loadColumn();

		return $tables;
	}
516814
public List<String> getTables() {
		List<String> tables = new ArrayList<>();
		List<Extensions> extensions = getExtensions(EXTENSION_NAME);
		if (extensions != null) {
			for (Extensions extension : extensions) {
				tables.add(extension.getTableName());
			}
		}
		return tables;
	}
93483
def _get_archive_listing(self, archive_name):
        '''
        
        '''

        res = self.collection.find_one({'_id': archive_name})

        if res is None:
            raise KeyError

        return res
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);
    }
38923
def list_tables(self):
        
        # Server does not do pagination on listings of this resource.
        # Return an iterator anyway for similarity with other API methods
        path = '/archive/{}/tables'.format(self._instance)
        response = self._client.get_proto(path=path)
        message = rest_pb2.ListTablesResponse()
        message.ParseFromString(response.content)
        tables = getattr(message, 'table')
        return iter([Table(table) for table in tables])
610880
private List<Row> getTable(String name)
   {
      List<Row> result = m_tables.get(name);
      if (result == null)
      {
         result = Collections.emptyList();
      }
      return result;
   }