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

Function buildFakeEnabledEnvironment

console/src/store/environments.ts:436–454  ·  view source on GitHub ↗

* Builds a fake enabled environment for self-managed and impersonation.

({
  httpAddress,
  status,
}: {
  httpAddress: string;
  status: EnvironmentStatus;
})

Source from the content-addressed store, hash-verified

434 */
435
436function buildFakeEnabledEnvironment({
437 httpAddress,
438 status,
439}: {
440 httpAddress: string;
441 status: EnvironmentStatus;
442}): EnabledEnvironment {
443 return {
444 httpAddress,
445 sqlAddress: "",
446 resolvable: true,
447 // A made up enabled at time only used during impersonation and self-managed,
448 // since we don't know when the environment was enabled.
449 enabledAt: fakeEnabledAt.toString(),
450 state: "enabled",
451 status,
452 errors: [],
453 };
454}
455
456const selectVersionQuery = sql`SELECT mz_version()`.compile(queryBuilder);
457

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected