Skip to main content

CommandModule

CommandModule structure

Description

The CommandModule is a dynamic module used to register data sync handlers and provide some services associated with the table name.

Methods

static register(option)

When import this module, you must provide a specific option for use. The option has 4 properties that you can configure:

PropertiesDescription
tableName: stringprovide table name
skipError?: booleanIf set to true, it will skip errors from previous commands.
dataSyncHandlers?: Type[]register data sync handler
disableDefaulHandler?: booleanIf set to true, it will reset default data sync handlers

For example:

CommandModule.register({
tableName: "cat",
dataSyncHandlers: [CatDataSyncRdsHandler],
});

Here, the CommandModule registers with the cat table name and provides the CatDataSyncRdsHandler to the data sync handlers.