跳到主要内容
非官方简体中文翻译,内容版权归 Mastra 所有,遵循 Apache-2.0 许可。

Mastra.setStorage()

The .setStorage() method is used to set the storage instance for the Mastra instance. This method accepts a single MastraCompositeStore parameter.

Usage example
Usage example的直接链接

mastra.setStorage(
new LibSQLStore({
id: 'mastra-storage',
url: ':memory:',
}),
)

Parameters
Parameters的直接链接

storage:

MastraCompositeStore
The storage instance to set for the Mastra instance.

Returns
Returns的直接链接

This method doesn't return a value.

On this page