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

    function getDbClient(moduleId: string): DbClient;

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

    按 moduleId 取出已登记的作用域客户端。

    Parameters

    ParameterType
    moduleIdstring

    Returns

    DbClient

    Throws

    尚未 setDbModuleContext / create 登记时抛出。