Class JdbcStore

java.lang.Object
io.agentscope.extensions.jdbc.store.JdbcStore
All Implemented Interfaces:
io.agentscope.harness.agent.filesystem.remote.store.BaseStore

public class JdbcStore extends Object implements io.agentscope.harness.agent.filesystem.remote.store.BaseStore
JDBC-backed BaseStore with zero inline SQL — all database-specific SQL is delegated to StoreDialect.

Supports MySQL, PostgreSQL, SQLite, and H2 via the dialect abstraction. Business logic (CAS, namespace encoding, hash-based change detection, pagination) is completely database-agnostic.

Author:
shanhongyu
  • Method Details

    • builder

      public static JdbcStore.Builder builder(DataSource dataSource)
      Creates a builder for JdbcStore.
    • get

      public io.agentscope.harness.agent.filesystem.remote.store.StoreItem get(List<String> namespace, String key)
      Specified by:
      get in interface io.agentscope.harness.agent.filesystem.remote.store.BaseStore
    • put

      public void put(List<String> namespace, String key, Map<String,Object> value)
      Specified by:
      put in interface io.agentscope.harness.agent.filesystem.remote.store.BaseStore
    • putIfVersion

      public boolean putIfVersion(List<String> namespace, String key, Map<String,Object> value, long expectedVersion)
      Specified by:
      putIfVersion in interface io.agentscope.harness.agent.filesystem.remote.store.BaseStore
    • search

      public List<io.agentscope.harness.agent.filesystem.remote.store.StoreItem> search(List<String> namespace, int limit, int offset)
      Specified by:
      search in interface io.agentscope.harness.agent.filesystem.remote.store.BaseStore
    • delete

      public void delete(List<String> namespace, String key)
      Specified by:
      delete in interface io.agentscope.harness.agent.filesystem.remote.store.BaseStore