Class JdbcStore.Builder
java.lang.Object
io.agentscope.extensions.mysql.store.JdbcStore.Builder
- Enclosing class:
- JdbcStore
Builder for
JdbcStore.-
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds theJdbcStore.dialect(JdbcStoreDialect dialect) Sets the dialect explicitly.initializeSchema(boolean initializeSchema) Whentrue, runs the dialect'sCREATE TABLE IF NOT EXISTSduring construction.objectMapper(com.fasterxml.jackson.databind.ObjectMapper objectMapper) Sets a custom JacksonObjectMapperfor value serialisation.Overrides the table name.
-
Method Details
-
dialect
Sets the dialect explicitly. When omitted, the dialect is auto-detected viaJdbcStoreDialect.from(DataSource)onbuild(). -
objectMapper
Sets a custom JacksonObjectMapperfor value serialisation. -
tableName
Overrides the table name. Must match the regex[A-Za-z_][A-Za-z0-9_]*; this is the only place a table identifier ever flows into the SQL string verbatim, so the validation here is the SQL-injection guard. -
initializeSchema
Whentrue, runs the dialect'sCREATE TABLE IF NOT EXISTSduring construction. Defaults tofalse— production deployments usually own their schema via migration tooling. -
build
Builds theJdbcStore.
-