API reference / @evolu/common / Evolu/Internal / DbWorkerInput

Type Alias: DbWorkerInput

type DbWorkerInput =
  | {
      config: Config;
      dbSchema: DbSchema;
      type: "init";
    }
  | {
      changes: NonEmptyReadonlyArray<DbChange>;
      onCompleteIds: ReadonlyArray<CallbackId>;
      subscribedQueries: ReadonlyArray<Query>;
      tabId: Id;
      type: "mutate";
    }
  | {
      queries: NonEmptyReadonlyArray<Query>;
      tabId: Id;
      type: "query";
    }
  | {
      onCompleteId: CallbackId;
      reload: boolean;
      restore?: {
        dbSchema: DbSchema;
        mnemonic: Mnemonic;
      };
      type: "reset";
    }
  | {
      dbSchema: DbSchema;
      type: "ensureDbSchema";
    }
  | {
      onCompleteId: CallbackId;
      type: "export";
    };

Defined in: packages/common/src/Evolu/Db.ts:115

Was this page helpful?