It downloads a list of all existing subscriptions in a database.

@param start Range start
@param take Maximum number of items that will be retrieved
@param database Database to use
@return List of subscriptions state
321134
public List<SubscriptionState> getSubscriptions(int start, int take, String database) {
        RequestExecutor requestExecutor = _store.getRequestExecutor(ObjectUtils.firstNonNull(database, _store.getDatabase()));

        GetSubscriptionsCommand command = new GetSubscriptionsCommand(start, take);
        requestExecutor.execute(command);

        return Arrays.asList(command.getResult());
    }
412302
public java.util.List<DBSnapshot> getDBSnapshots() {
        if (dBSnapshots == null) {
            dBSnapshots = new com.amazonaws.internal.SdkInternalList<DBSnapshot>();
        }
        return dBSnapshots;
    }
206051
function databaseInitialize() {
  var entries = db.getCollection("entries");
  var messages = db.getCollection("messages");

  // Add our main example collection if this is first run.
  // This collection will save into a partition named quickstart3.db.0 (collection 0)  
  if (entries === null) {
    // first time run so add and configure collection with some arbitrary options
    entries = db.addCollection("entries");
  }

  if (messages === null) {
    messages = db.addCollection("messages");
    messages.insert({ txt: "i will only insert into this collection during databaseInitialize" });
  }
}
1266546
public Collection<DbAndTable> getTables() throws IOException {
    List<DbAndTable> tables = Lists.newArrayList();

    try (AutoReturnableObject<IMetaStoreClient> client = this.clientPool.getClient()) {
      Iterable<String> databases = Iterables.filter(client.get().getAllDatabases(), new Predicate<String>() {
        @Override
        public boolean apply(String db) {
          return HiveDatasetFinder.this.whitelistBlacklist.acceptDb(db);
        }
      });
      for (final String db : databases) {

        Iterable<String> tableNames = Iterables.filter(client.get().getAllTables(db), new Predicate<String>() {
          @Override
          public boolean apply(String table) {
            return HiveDatasetFinder.this.whitelistBlacklist.acceptTable(db, table);
          }
        });
        for (String tableName : tableNames) {
          tables.add(new DbAndTable(db, tableName));
        }
      }
    } catch (Exception exc) {
      throw new IOException(exc);
    }

    return tables;
  }
5480
@Override
    protected List<ProxyDistribution> loadBeans(final int startIndex, final int count) {
        Page<DistributionSet> distBeans;
        final List<ProxyDistribution> proxyDistributions = new ArrayList<>();
        if (startIndex == 0 && firstPageDistributionSets != null) {
            distBeans = firstPageDistributionSets;
        } else if (pinnedTarget != null) {
            final DistributionSetFilterBuilder distributionSetFilterBuilder = new DistributionSetFilterBuilder()
                    .setIsDeleted(false).setIsComplete(true).setSearchText(searchText)
                    .setSelectDSWithNoTag(noTagClicked).setTagNames(distributionTags);

            distBeans = getDistributionSetManagement().findByFilterAndAssignedInstalledDsOrderedByLinkTarget(
                    new OffsetBasedPageRequest(startIndex, count, sort), distributionSetFilterBuilder,
                    pinnedTarget.getControllerId());
        } else if (distributionTags.isEmpty() && StringUtils.isEmpty(searchText) && !noTagClicked) {
            // if no search filters available
            distBeans = getDistributionSetManagement()
                    .findByCompleted(new OffsetBasedPageRequest(startIndex, count, sort), true);
        } else {
            final DistributionSetFilter distributionSetFilter = new DistributionSetFilterBuilder().setIsDeleted(false)
                    .setIsComplete(true).setSearchText(searchText).setSelectDSWithNoTag(noTagClicked)
                    .setTagNames(distributionTags).build();
            distBeans = getDistributionSetManagement().findByDistributionSetFilter(
                    new OffsetBasedPageRequest(startIndex, count, sort), distributionSetFilter);
        }

        for (final DistributionSet distributionSet : distBeans) {
            final ProxyDistribution proxyDistribution = new ProxyDistribution();
            proxyDistribution.setName(distributionSet.getName());
            proxyDistribution.setDescription(distributionSet.getDescription());
            proxyDistribution.setId(distributionSet.getId());
            proxyDistribution.setDistId(distributionSet.getId());
            proxyDistribution.setVersion(distributionSet.getVersion());
            proxyDistribution.setCreatedDate(SPDateTimeUtil.getFormattedDate(distributionSet.getCreatedAt()));
            proxyDistribution.setLastModifiedDate(SPDateTimeUtil.getFormattedDate(distributionSet.getLastModifiedAt()));
            proxyDistribution.setCreatedByUser(UserDetailsFormatter.loadAndFormatCreatedBy(distributionSet));
            proxyDistribution.setModifiedByUser(UserDetailsFormatter.loadAndFormatLastModifiedBy(distributionSet));
            proxyDistribution.setNameVersion(
                    HawkbitCommonUtil.getFormattedNameVersion(distributionSet.getName(), distributionSet.getVersion()));
            proxyDistributions.add(proxyDistribution);
        }
        return proxyDistributions;
    }
104572
public void init(BaseDatabase database, Record record)
    {
        super.init(database, record);
        if (((QueryRecord)record).getBaseRecord() != null)
            m_tableNext = ((QueryRecord)record).getBaseRecord().getTable();   // Pass most commands thru to the main record's table
    }
686611
public List<Entry> getEntries(int start, int count) {
        List<Entry> result = Lists.newArrayList();
        int index = start;
        int itemsToReturn = count;
        synchronized (entries) {
            Iterator<Entry> iter = entries.iterator();
            while (iter.hasNext() && index > 0) {
                iter.next();
                index--;
            }
            while (iter.hasNext() && itemsToReturn > 0) {
                result.add(iter.next());
                itemsToReturn--;
            }
        }

        return result;
    }
913837
@Override
	public List<RecordContext> getAllData () throws DatabaseException {
    	try {
			List<RecordContext> result = new ArrayList<>();
			try (ResultSet rs = psGetAllData.executeQuery()) {
				while (rs.next()) {
					result.add(new RecordContext(rs.getLong(DATAID), rs.getInt(CONTEXTID), rs.getInt(TYPE), rs.getString(DATA)));
				}
			}
			
			return result;
		} catch (SQLException e) {
			throw new DatabaseException(e);
		}
    }
1343575
@NonNull
    public static As database(@NonNull com.couchbase.lite.Database database) {
        if (database == null) {
            throw new IllegalArgumentException("database cannot be null.");
        }
        return new As(database);
    }
1258598
public List<String> range(int start,int end){
        try {    		
        	return new ArrayList<>(getJedisCommands(groupName).zrange(key, start, end));
    	} finally{
			getJedisProvider(groupName).release();
		}
	}
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;
    }
584145
public List<?> selectList(String statement, Object parameter){
    statement = dbSqlSessionFactory.mapStatement(statement);
    List<Object> resultList = sqlSession.selectList(statement, parameter);
    for (Object object : resultList) {
      fireEntityLoaded(object);
    }
    return resultList;
  }
378460
@Override
    public List<HBaseData> loadAll(HTableInterface hTable, Filter filter, byte[] startRow, byte[] endRow,
            String columnFamily, String qualifier, String[] columns) throws IOException
    {
        List<HBaseData> results = null;
        if (scanner == null)
        {
            Scan s = null;
            if (startRow != null && endRow != null && startRow.equals(endRow))
            {
                Get g = new Get(startRow);
                s = new Scan(g);
            }
            else if (startRow != null && endRow != null)
            {
                s = new Scan(startRow, endRow);
            }
            else if (startRow != null)
            {
                s = new Scan(startRow);
            }
            else if (endRow != null)
            {
                s = new Scan();
                s.setStopRow(endRow);
            }
            else
            {
                s = new Scan();
            }
            setScanCriteria(filter, columnFamily, qualifier, s, columns);
            scanner = hTable.getScanner(s);
            resultsIter = scanner.iterator();
        }
        return scanResults(null, results);
    }
1045191
ApiFuture<Void> begin() {
    BeginTransactionRequest.Builder beginTransaction = BeginTransactionRequest.newBuilder();
    beginTransaction.setDatabase(firestore.getDatabaseName());

    if (previousTransactionId != null) {
      beginTransaction
          .getOptionsBuilder()
          .getReadWriteBuilder()
          .setRetryTransaction(previousTransactionId);
    }

    ApiFuture<BeginTransactionResponse> transactionBeginFuture =
        firestore.sendRequest(
            beginTransaction.build(), firestore.getClient().beginTransactionCallable());

    return ApiFutures.transform(
        transactionBeginFuture,
        new ApiFunction<BeginTransactionResponse, Void>() {
          @Override
          public Void apply(BeginTransactionResponse beginTransactionResponse) {
            transactionId = beginTransactionResponse.getTransaction();
            pending = true;
            return null;
          }
        });
  }
1087987
@Override
    public List<Index> listIndexes() throws QueryException {
        try {
            return DatabaseImpl.get(dbQueue.submit(new ListIndexesCallable()));
        }  catch (ExecutionException e) {
            String msg = "Failed to list indexes";
            logger.log(Level.SEVERE, msg, e);
            throw new QueryException(msg, e);
        }

    }
992251
public Observable<Page<SubscriptionInner>> listAsync() {
        return listWithServiceResponseAsync()
            .map(new Func1<ServiceResponse<Page<SubscriptionInner>>, Page<SubscriptionInner>>() {
                @Override
                public Page<SubscriptionInner> call(ServiceResponse<Page<SubscriptionInner>> response) {
                    return response.body();
                }
            });
    }
1191099
public KNNDistanceOrderResult run(Database database, Relation<O> relation) {
    final DistanceQuery<O> distanceQuery = database.getDistanceQuery(relation, getDistanceFunction());
    final KNNQuery<O> knnQuery = database.getKNNQuery(distanceQuery, k + 1);

    final int size = (int) ((sample <= 1.) ? Math.ceil(relation.size() * sample) : sample);
    DBIDs sample = DBIDUtil.randomSample(relation.getDBIDs(), size, rnd);

    FiniteProgress prog = LOG.isVerbose() ? new FiniteProgress("Sampling kNN distances", size, LOG) : null;
    double[] knnDistances = new double[size];
    int i = 0;
    for(DBIDIter iditer = sample.iter(); iditer.valid(); iditer.advance(), i++) {
      final KNNList neighbors = knnQuery.getKNNForDBID(iditer, k + 1);
      knnDistances[i] = neighbors.getKNNDistance();
      LOG.incrementProcessed(prog);
    }
    LOG.ensureCompleted(prog);

    return new KNNDistanceOrderResult(knnDistances, k);
  }