# Variable cozoDbWorkerInstance

cozoDbWorkerInstance: Remote<{
executeBatchPutCommand: ((tableName, array, batchSize?, onProgress?) => Promise<{
ok: boolean;
}>);
executeGetCommand: ((tableName, selectFields?, conditions?, conditionFields?, options?) => Promise<IDBResult | IDBResultError>);
executePutCommand: ((tableName, array) => Promise<IDBResult | IDBResultError>);
executeRmCommand: ((tableName, keyValues) => Promise<IDBResult | IDBResultError>);
executeUpdateCommand: ((tableName, array) => Promise<IDBResult | IDBResultError>);
exportRelations: ((relations) => Promise<any>);
importRelations: ((content) => Promise<any>);
init: (() => Promise<void>);
isInitialized: (() => Promise<boolean>);
runCommand: ((command) => Promise<IDBResult | IDBResultError>);
}>

#### Type declaration

- ##### executeBatchPutCommand: ((tableName, array, batchSize?, onProgress?) => Promise<{
  ok: boolean;
  }>)

  - - (tableName, array, batchSize?, onProgress?): Promise<{
      ok: boolean;
      }>

    - #### Parameters

      - tableName: string
      - array: Partial<DbEntity>[]
      - batchSize: number = array.length
      - `Optional` onProgress: ((count) => void)
        - - (count): void

          - #### Parameters

            - count: number

            #### Returns void

      #### Returns Promise<{
      ok: boolean;
      }>

- ##### executeGetCommand: ((tableName, selectFields?, conditions?, conditionFields?, options?) => Promise<IDBResult | IDBResultError>)

  - - (tableName, selectFields?, conditions?, conditionFields?, options?): Promise<IDBResult | IDBResultError>

    - #### Parameters

      - tableName: string
      - `Optional` selectFields: string[]
      - `Optional` conditions: string[]
      - `Optional` conditionFields: string[]
      - options: GetCommandOptions = {}

      #### Returns Promise<IDBResult | IDBResultError>

- ##### executePutCommand: ((tableName, array) => Promise<IDBResult | IDBResultError>)

  - - (tableName, array): Promise<IDBResult | IDBResultError>

    - #### Parameters

      - tableName: string
      - array: Partial<DbEntity>[]

      #### Returns Promise<IDBResult | IDBResultError>

- ##### executeRmCommand: ((tableName, keyValues) => Promise<IDBResult | IDBResultError>)

  - - (tableName, keyValues): Promise<IDBResult | IDBResultError>

    - #### Parameters

      - tableName: string
      - keyValues: Partial<DbEntity>[]

      #### Returns Promise<IDBResult | IDBResultError>

- ##### executeUpdateCommand: ((tableName, array) => Promise<IDBResult | IDBResultError>)

  - - (tableName, array): Promise<IDBResult | IDBResultError>

    - #### Parameters

      - tableName: string
      - array: Partial<DbEntity>[]

      #### Returns Promise<IDBResult | IDBResultError>

- ##### exportRelations: ((relations) => Promise<any>)

  - - (relations): Promise<any>

    - #### Parameters

      - relations: string[]

      #### Returns Promise<any>

- ##### importRelations: ((content) => Promise<any>)

  - - (content): Promise<any>

    - #### Parameters

      - content: string

      #### Returns Promise<any>

- ##### init: (() => Promise<void>)

  - - (): Promise<void>

    - #### Returns Promise<void>

- ##### isInitialized: (() => Promise<boolean>)

  - - (): Promise<boolean>

    - #### Returns Promise<boolean>

- ##### runCommand: ((command) => Promise<IDBResult | IDBResultError>)

  - - (command): Promise<IDBResult | IDBResultError>

    - #### Parameters

      - command: string

      #### Returns Promise<IDBResult | IDBResultError>

- Defined in work/deeplinks/deeplinks/imports/cyber/backend/workers/db/service.ts:7