Lists all artifacts that are stored in the database.
352203
def ReadAllArtifacts(self):
    """"""
    artifacts = []

    for artifact in itervalues(self.artifacts):
      artifacts.append(artifact.Copy())

    return artifacts
1130550
def artifacts(self):
        
        return ArtifactManager(
            session=self._session,
            pipeline_name=self.pipeline_name,
            pipeline_counter=self.pipeline_counter,
            stage_name=self.stage_name,
            stage_counter=self.stage_counter,
            job_name=self.data.name
        )
390204
def Handle(self, args, token=None):
    """"""

    # Get all artifacts that aren't Bootstrap and aren't the base class.
    artifacts_list = sorted(
        artifact_registry.REGISTRY.GetArtifacts(
            reload_datastore_artifacts=True),
        key=lambda art: art.name)

    total_count = len(artifacts_list)

    if args.count:
      artifacts_list = artifacts_list[args.offset:args.offset + args.count]
    else:
      artifacts_list = artifacts_list[args.offset:]

    descriptors = self.BuildArtifactDescriptors(artifacts_list)
    return ApiListArtifactsResult(items=descriptors, total_count=total_count)
1072764
public function list_databases()
	{
		if (isset($this->db->data_cache['db_names']))
		{
			return $this->db->data_cache['db_names'];
		}

		return $this->db->data_cache['db_names'] = cubrid_list_dbs($this->db->conn_id);
	}
615399
static List<String> getAllTables(String database, Statement stmt) throws SQLException {
        List<String> table = new ArrayList<>();
        ResultSet rs;
        rs = stmt.executeQuery("SHOW TABLE STATUS FROM `" + database + "`;");
        while ( rs.next() ) {
            table.add(rs.getString("Name"));
        }
        return table;
    }
84539
def all(self):
        
        logger.debug(f'Query `{self.__class__.__name__}` objects with filters {self}')

        # Destroy any cached results
        self._result_cache = None

        # Fetch Model class and connected repository from Repository Factory
        model_cls = repo_factory.get_model(self._entity_cls)
        repository = repo_factory.get_repository(self._entity_cls)

        # order_by clause must be list of keys
        order_by = self._entity_cls.meta_.order_by if not self._order_by else self._order_by

        # Call the read method of the repository
        results = repository.filter(self._criteria, self._offset, self._limit, order_by)

        # Convert the returned results to entity and return it
        entity_items = []
        for item in results.items:
            entity = model_cls.to_entity(item)
            entity.state_.mark_retrieved()
            entity_items.append(entity)
        results.items = entity_items

        # Cache results
        self._result_cache = results

        return results
124036
def get_all_database_accessions(chebi_ids):
    ''''''
    all_database_accessions = [get_database_accessions(chebi_id)
                               for chebi_id in chebi_ids]
    return [x for sublist in all_database_accessions for x in sublist]
939407
def show_tables():
    
    _State.connection()
    _State.reflect_metadata()
    metadata = _State.metadata

    response = select('name, sql from sqlite_master where type="table"')

    return {row['name']: row['sql'] for row in response}
441709
public function listDatabases()
    {
        $json = (string) $this->client->request('GET', '/_all_dbs')->getBody();
        $databases = JSONEncoder::decode($json);

        return $databases;
    }
610324
public static Collection<? extends Artifact> filter(Collection<Artifact> artifacts) {
        LinkedHashSet<Artifact> set = new LinkedHashSet<>();
        for (Artifact artifact : artifacts) {
            if (MavenArtifact.isValid(artifact)) {
                set.add(artifact);
            }
        }
        return set;
    }
114978
def ReadAllArtifacts(self, cursor=None):
    """"""
    cursor.execute("SELECT definition FROM artifacts")
    return [_RowToArtifact(row) for row in cursor.fetchall()]
169028
def listTables(self, dbName=None):
        
        if dbName is None:
            dbName = self.currentDatabase()
        iter = self._jcatalog.listTables(dbName).toLocalIterator()
        tables = []
        while iter.hasNext():
            jtable = iter.next()
            tables.append(Table(
                name=jtable.name(),
                database=jtable.database(),
                description=jtable.description(),
                tableType=jtable.tableType(),
                isTemporary=jtable.isTemporary()))
        return tables
557721
def GetClassesByArtifact(cls, artifact_name):
    """"""
    return [
        cls.classes[c]
        for c in cls.classes
        if artifact_name in cls.classes[c].supported_artifacts
    ]
1038235
public void collectDbStats(ArrayList<com.couchbase.lite.internal.database.sqlite.SQLiteDebug.DbStats> dbStatsList) {
        synchronized (mLock) {
            if (mAvailablePrimaryConnection != null) {
                mAvailablePrimaryConnection.collectDbStats(dbStatsList);
            }

            for (SQLiteConnection connection : mAvailableNonPrimaryConnections) {
                connection.collectDbStats(dbStatsList);
            }

            for (SQLiteConnection connection : mAcquiredConnections.keySet()) {
                connection.collectDbStatsUnsafe(dbStatsList);
            }
        }
    }
14980
def list_books(self):
        '''  '''
        names = []
        try:
            for n in self.cur.execute("SELECT name FROM book;").fetchall():
                names.extend(n)
        except:
            self.error("ERROR: cannot find database table 'book'")
        return(names)
920580
def artifacts(self):
        
        if self._artifact_manager is None:
            self._artifact_manager = ArtifactManager(session=self._session)
        return self._artifact_manager
84885
def info(self):
        
        t = self.query("SELECT * FROM sqlite_master WHERE type='table'", fmt='table')
        all_tables = t['name'].tolist()
        print('\nDatabase path: {} \nSQL path: {}\n'.format(self.dbpath, self.sqlpath))
        print('Database Inventory')
        print('==================')
        for table in ['sources'] + [t for t in all_tables if
                                    t not in ['sources', 'sqlite_sequence']]:
            x = self.query('select count() from {}'.format(table), fmt='array', fetch='one')
            if x is None: continue
            print('{}: {}'.format(table.upper(), x[0]))