Builder
public static class Builder
源码Source
io/agentscope/core/skill/repository/postgresql/PostgresSkillRepository.java:1299–1396构建器,用于构建并配置目标实例。位于 io.agentscope.core.skill.repository.postgresql 包。核心成员包括 schemaName、skillsTableName、resourcesTableName、createIfNotExist、writeable、build。
Builder for creating PostgresSkillRepository instances with custom configuration.
This builder provides a fluent API for configuring all aspects of the repository, including schema name, table names, and behavior options.
方法摘要Method Summary
| 方法Method | 说明Description |
|---|---|
public Builder schemaName(String schemaName) | 设置模式名称。 Set the schema name for storing skills. |
public Builder skillsTableName(String skillsTableName) | 设置该配置项。 Set the skills table name. |
public Builder resourcesTableName(String resourcesTableName) | 设置该配置项。 Set the resources table name. |
public Builder createIfNotExist(boolean createIfNotExist) | 创建 `createIfNotExist`。 Set whether to create schema and tables if they don't exist. |
public Builder writeable(boolean writeable) | 设置该配置项。 Set whether the repository supports write operations. |
public PostgresSkillRepository build() | 构建PostgresSkillRepository 实例。 Build the PostgresSkillRepository instance. |
方法详情Method Detail
schemaName
public Builder schemaName(String schemaName)
设置模式名称。
Set the schema name for storing skills.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
schemaName | String | 模式名称(类型 `String`)。the schema name (default: "agentscope") |
Builder返回当前实例,以支持链式调用。this builder for method chaining
源码Source
io/agentscope/core/skill/repository/postgresql/PostgresSkillRepository.java:1327–1330skillsTableName
public Builder skillsTableName(String skillsTableName)
设置该配置项。
Set the skills table name.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
skillsTableName | String | 技能 Table 名称(类型 `String`)。the skills table name (default: "agentscope_skills") |
Builder返回当前实例,以支持链式调用。this builder for method chaining
源码Source
io/agentscope/core/skill/repository/postgresql/PostgresSkillRepository.java:1338–1341resourcesTableName
public Builder resourcesTableName(String resourcesTableName)
设置该配置项。
Set the resources table name.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
resourcesTableName | String | resources Table 名称(类型 `String`)。the resources table name (default: "agentscope_skill_resources") |
Builder返回当前实例,以支持链式调用。this builder for method chaining
源码Source
io/agentscope/core/skill/repository/postgresql/PostgresSkillRepository.java:1350–1353createIfNotExist
public Builder createIfNotExist(boolean createIfNotExist)
创建 createIfNotExist。
Set whether to create schema and tables if they don't exist.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
createIfNotExist | boolean | 创建 If 不 Exist(类型 `boolean`)。true to auto-create, false to require existing (default: true) |
Builder返回当前实例,以支持链式调用。this builder for method chaining
源码Source
io/agentscope/core/skill/repository/postgresql/PostgresSkillRepository.java:1362–1365writeable
public Builder writeable(boolean writeable)
设置该配置项。
Set whether the repository supports write operations.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
writeable | boolean | writeable(类型 `boolean`)。true to enable write operations, false for read-only (default: true) |
Builder返回当前实例,以支持链式调用。this builder for method chaining
源码Source
io/agentscope/core/skill/repository/postgresql/PostgresSkillRepository.java:1374–1377build
public PostgresSkillRepository build()
构建PostgresSkillRepository 实例。
Build the PostgresSkillRepository instance.
PostgresSkillRepository一种新的PostgresSkillRepository 实例。a new PostgresSkillRepository instance
IllegalArgumentException可能抛出 `IllegalArgumentException`。if identifiers are invalidIllegalStateException可能抛出 `IllegalStateException`。if createIfNotExist is false and schema/tables do not exist
源码Source
io/agentscope/core/skill/repository/postgresql/PostgresSkillRepository.java:1387–1395