Builder
public static final class Builder
源码Source
io/agentscope/extensions/postgresql/store/PostgresBaseStore.java:381–448PostgresBaseStore的构建器。位于 io.agentscope.extensions.postgresql.store 包。核心成员包括 objectMapper、schemaName、tableName、initializeSchema、build。
Builder for PostgresBaseStore.
方法摘要Method Summary
| 方法Method | 说明Description |
|---|---|
public Builder objectMapper(ObjectMapper objectMapper) | 设置该配置项。 Sets a custom Jackson `ObjectMapper` for value serialisation. |
public Builder schemaName(String schemaName) | 设置PostgreSQL 模式名称到使用。 Sets the PostgreSQL schema name to use. |
public Builder tableName(String tableName) | 设置该配置项。 Overrides the table name. |
public Builder initializeSchema(boolean initializeSchema) | 设置初始化模式。 When `true`, runs `CREATE TABLE IF NOT EXISTS` during construction. |
public PostgresBaseStore build() | 构建`PostgresBaseStore`。 Builds the `PostgresBaseStore`. |
方法详情Method Detail
objectMapper
public Builder objectMapper(ObjectMapper objectMapper)
设置该配置项。
Sets a custom Jackson ObjectMapper for value serialisation.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
objectMapper | ObjectMapper | 对象 Mapper(类型 `ObjectMapper`)。The object mapper. |
Builder返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source
io/agentscope/extensions/postgresql/store/PostgresBaseStore.java:394–397schemaName
public Builder schemaName(String schemaName)
设置PostgreSQL 模式名称到使用。
Sets the PostgreSQL schema name to use.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
schemaName | String | 模式名称(类型 `String`)。The schema name. |
Builder返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source
io/agentscope/extensions/postgresql/store/PostgresBaseStore.java:406–409tableName
public Builder tableName(String tableName)
设置该配置项。
Overrides the table name.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
tableName | String | table 名称(类型 `String`)。The table name. |
Builder返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source
io/agentscope/extensions/postgresql/store/PostgresBaseStore.java:417–420initializeSchema
public Builder initializeSchema(boolean initializeSchema)
设置初始化模式。
When true, runs CREATE TABLE IF NOT EXISTS during construction.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
initializeSchema | boolean | 初始化模式(类型 `boolean`)。The initialize schema. |
Builder返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source
io/agentscope/extensions/postgresql/store/PostgresBaseStore.java:427–430build
public PostgresBaseStore build()
构建PostgresBaseStore。
Builds the PostgresBaseStore.
PostgresBaseStore返回PostgresBaseStore。Returns postgres base store.
源码Source
io/agentscope/extensions/postgresql/store/PostgresBaseStore.java:433–437