Class PostgresBaseStore.Builder
java.lang.Object
io.agentscope.extensions.postgresql.store.PostgresBaseStore.Builder
- Enclosing class:
- PostgresBaseStore
Builder for
PostgresBaseStore.-
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds thePostgresBaseStore.initializeSchema(boolean initializeSchema) Whentrue, runsCREATE TABLE IF NOT EXISTSduring construction.objectMapper(com.fasterxml.jackson.databind.ObjectMapper objectMapper) Sets a custom JacksonObjectMapperfor value serialisation.schemaName(String schemaName) Sets the PostgreSQL schema name to use.Overrides the table name.
-
Method Details
-
objectMapper
public PostgresBaseStore.Builder objectMapper(com.fasterxml.jackson.databind.ObjectMapper objectMapper) Sets a custom JacksonObjectMapperfor value serialisation. -
schemaName
Sets the PostgreSQL schema name to use. If not set, SQL uses the unqualified table name for backwards compatibility.The provided schema name must be non-null, non-blank, and match
[A-Za-z_][A-Za-z0-9_]*. The schema is created wheninitializeSchema(boolean)is enabled. -
tableName
Overrides the table name. Identifiers must match the regex[A-Za-z_][A-Za-z0-9_]*.Schema and table identifiers are embedded into SQL (identifier quoting is used when a schema is configured), so validation here is the SQL-injection guard.
-
initializeSchema
Whentrue, runsCREATE TABLE IF NOT EXISTSduring construction. Defaults tofalse— production deployments usually own their schema via migration tooling. -
build
Builds thePostgresBaseStore.
-