Class PostgresSkillRepository.Builder
java.lang.Object
io.agentscope.core.skill.repository.postgresql.PostgresSkillRepository.Builder
- Enclosing class:
- PostgresSkillRepository
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
Modifier and TypeMethodDescriptionbuild()Build the PostgresSkillRepository instance.createIfNotExist(boolean createIfNotExist) Set whether to create schema and tables if they don't exist.resourcesTableName(String resourcesTableName) Set the resources table name.schemaName(String schemaName) Set the schema name for storing skills.skillsTableName(String skillsTableName) Set the skills table name.writeable(boolean writeable) Set whether the repository supports write operations.
-
Method Details
-
schemaName
Set the schema name for storing skills.- Parameters:
schemaName- the schema name (default: "agentscope")- Returns:
- this builder for method chaining
-
skillsTableName
Set the skills table name.- Parameters:
skillsTableName- the skills table name (default: "agentscope_skills")- Returns:
- this builder for method chaining
-
resourcesTableName
Set the resources table name.- Parameters:
resourcesTableName- the resources table name (default: "agentscope_skill_resources")- Returns:
- this builder for method chaining
-
createIfNotExist
Set whether to create schema and tables if they don't exist.- Parameters:
createIfNotExist- true to auto-create, false to require existing (default: true)- Returns:
- this builder for method chaining
-
writeable
Set whether the repository supports write operations.- Parameters:
writeable- true to enable write operations, false for read-only (default: true)- Returns:
- this builder for method chaining
-
build
Build the PostgresSkillRepository instance.- Returns:
- a new PostgresSkillRepository instance
- Throws:
IllegalArgumentException- if identifiers are invalidIllegalStateException- if createIfNotExist is false and schema/tables do not exist
-