For AI agents: the complete documentation index is available at /en/llms.txt, the full documentation bundle is available at /en/llms-full.txt, and this page is available as Markdown at /en/reference/sdk/sapi/db/functions/setDbModuleContext.md.
  • English
  • Function: setDbModuleContext()

    function setDbModuleContext(moduleId: string, token: string): void;

    Defined in: sapi/db/client.ts:336

    登记/刷新模块数据库身份,并激活为单例 db 的转发目标。 同一 moduleId 重复调用时复用实例并更新 token(保留进行中的事务)。

    Parameters

    ParameterType
    moduleIdstring
    tokenstring

    Returns

    void