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

Function useSubscribeToAllSchemas

console/src/store/allSchemas.ts:30–41  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

28});
29
30export function useSubscribeToAllSchemas() {
31 const subscribe = React.useMemo(() => {
32 return buildSubscribeQuery(buildAllSchemaListQuery(), { upsertKey: "id" });
33 }, []);
34
35 return useGlobalUpsertSubscribe({
36 atom: allSchemas,
37 subscribe,
38 select: (row) => row.data,
39 upsertKey: (row) => row.data.id,
40 });
41}
42
43export function useAllSchemas(options?: { includeSystemSchemas?: boolean }) {
44 const includeSystemSchemas = options?.includeSystemSchemas ?? true;

Callers 1

useAppInitializerFunction · 0.90

Calls 3

buildAllSchemaListQueryFunction · 0.90
useGlobalUpsertSubscribeFunction · 0.90
buildSubscribeQueryFunction · 0.85

Tested by

no test coverage detected