Class JdbcRemoteSnapshotClient
java.lang.Object
io.agentscope.extensions.jdbc.snapshot.JdbcRemoteSnapshotClient
- All Implemented Interfaces:
io.agentscope.harness.agent.sandbox.snapshot.RemoteSnapshotClient
public class JdbcRemoteSnapshotClient
extends Object
implements io.agentscope.harness.agent.sandbox.snapshot.RemoteSnapshotClient
RemoteSnapshotClient backed by a JDBC BLOB column, with zero inline SQL.
All SQL is sourced from SnapshotDialect, supporting MySQL, PostgreSQL, H2,
and SQLite.
- Author:
- shanhongyu
-
Constructor Summary
ConstructorsConstructorDescriptionJdbcRemoteSnapshotClient(DataSource dataSource, SnapshotDialect dialect) Creates a client with auto table creation.JdbcRemoteSnapshotClient(DataSource dataSource, SnapshotDialect dialect, boolean initializeSchema) Creates a client with optional auto table creation. -
Method Summary
-
Constructor Details
-
JdbcRemoteSnapshotClient
Creates a client with auto table creation.- Parameters:
dataSource- the JDBC data sourcedialect- the snapshot dialect
-
JdbcRemoteSnapshotClient
public JdbcRemoteSnapshotClient(DataSource dataSource, SnapshotDialect dialect, boolean initializeSchema) Creates a client with optional auto table creation.- Parameters:
dataSource- the JDBC data sourcedialect- the snapshot dialectinitializeSchema- when true, auto-creates the table
-
-
Method Details
-
upload
- Specified by:
uploadin interfaceio.agentscope.harness.agent.sandbox.snapshot.RemoteSnapshotClient- Throws:
Exception
-
download
- Specified by:
downloadin interfaceio.agentscope.harness.agent.sandbox.snapshot.RemoteSnapshotClient- Throws:
Exception
-
exists
- Specified by:
existsin interfaceio.agentscope.harness.agent.sandbox.snapshot.RemoteSnapshotClient- Throws:
Exception
-