MCPcopy Create free account
hub / github.com/MaterializeInc/materialize / fetchDatabaseList

Function fetchDatabaseList

console/src/api/materialize/databaseList.ts:28–41  ·  view source on GitHub ↗
({
  queryKey,
  requestOptions,
}: {
  queryKey: QueryKey;
  requestOptions: RequestInit;
})

Source from the content-addressed store, hash-verified

26 * Fetches all databases in the current environment
27 */
28export async function fetchDatabaseList({
29 queryKey,
30 requestOptions,
31}: {
32 queryKey: QueryKey;
33 requestOptions: RequestInit;
34}) {
35 const compiledQuery = buildDatabaseListQuery().compile();
36 return executeSqlV2({
37 queries: compiledQuery,
38 queryKey: queryKey,
39 requestOptions,
40 });
41}
42
43export type Database = InferResult<
44 ReturnType<typeof buildDatabaseListQuery>

Callers 1

useSchemaObjectFiltersFunction · 0.90

Calls 3

executeSqlV2Function · 0.90
buildDatabaseListQueryFunction · 0.85
compileMethod · 0.80

Tested by

no test coverage detected