Builder
public static final class Builder
源码Source
io/agentscope/extensions/jdbc/store/JdbcStore.java:281–321JdbcStore的构建器。位于 io.agentscope.extensions.jdbc.store 包。核心成员包括 dialect、objectMapper、initializeSchema、build。
Builder for JdbcStore.
方法摘要Method Summary
| 方法Method | 说明Description |
|---|---|
public Builder dialect(StoreDialect dialect) | 设置该配置项。 Sets the store dialect (required). |
public Builder objectMapper(ObjectMapper objectMapper) | 设置该配置项。 Sets a custom Jackson ObjectMapper. |
public Builder initializeSchema(boolean initializeSchema) | 设置初始化模式。 When true, runs the dialect's CREATE TABLE during construction. |
public JdbcStore build() | 构建JdbcStore。 Builds the JdbcStore. |
方法详情Method Detail
dialect
public Builder dialect(StoreDialect dialect)
设置该配置项。
Sets the store dialect (required).
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
dialect | StoreDialect | dialect(类型 `StoreDialect`)。The dialect. |
Builder返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source
io/agentscope/extensions/jdbc/store/JdbcStore.java:293–296objectMapper
public Builder objectMapper(ObjectMapper objectMapper)
设置该配置项。
Sets a custom Jackson ObjectMapper.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
objectMapper | ObjectMapper | 对象 Mapper(类型 `ObjectMapper`)。The object mapper. |
Builder返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source
io/agentscope/extensions/jdbc/store/JdbcStore.java:299–302initializeSchema
public Builder initializeSchema(boolean initializeSchema)
设置初始化模式。
When true, runs the dialect's CREATE TABLE during construction.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
initializeSchema | boolean | 初始化模式(类型 `boolean`)。The initialize schema. |
Builder返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source
io/agentscope/extensions/jdbc/store/JdbcStore.java:305–308build
public JdbcStore build()
构建JdbcStore。
Builds the JdbcStore.
JdbcStore返回JdbcStore。Returns jdbc store.
源码Source
io/agentscope/extensions/jdbc/store/JdbcStore.java:311–320