AS AgentScopeAPI 手册 / API Reference

SqliteDialect

public class SqliteDialect extends AbstractJdbcDialect
源码Source io/agentscope/extensions/jdbc/dialect/vendor/SqliteDialect.java:35–165

Sqlite Dialect,在多次调用之间保存和恢复会话与记忆数据。位于 io.agentscope.extensions.jdbc.dialect.vendor 包,继承自 AbstractJdbcDialect。核心成员包括 storeCreateTableDdls、storeUpsert、sessionStateCreateTableDdls、sessionStateUpsert、sessionStateCheckTableExists、snapshotCreateTableDdls。

SQLite dialect.

Uses SQLite-native TEXT/INTEGER types. UPSERT uses ON CONFLICT DO UPDATE (requires SQLite 3.24+). Table-existence check uses sqlite_master.

方法摘要Method Summary

方法Method说明Description
public List<String> storeCreateTableDdls()
返回 `storeCreateTableDdls` 结果。
Returns the store create table ddls.
public BoundSql storeUpsert(String namespacePath, String key, String json, long timestamp)
执行 `storeUpsert` 方法。
Performs the store upsert operation.
public List<String> sessionStateCreateTableDdls()
返回 `sessionStateCreateTableDdls` 结果。
Returns the session state create table ddls.
public BoundSql sessionStateUpsert(String sessionId, String stateKey, int itemIndex, String stateData)
执行 `sessionStateUpsert` 方法。
Performs the session state upsert operation.
public BoundSql sessionStateCheckTableExists(String tableName)
设置该参数。
Performs the session state check table exists operation.
public List<String> snapshotCreateTableDdls()
返回 `snapshotCreateTableDdls` 结果。
Returns the snapshot create table ddls.
public BoundSql snapshotUpsert(String snapshotId, InputStream data)
执行 `snapshotUpsert` 方法。
Performs the snapshot upsert operation.
public boolean supports(DatabaseMetaData metaData) throws SQLException
设置支持。
Performs the supports operation.

方法详情Method Detail

storeCreateTableDdls

public List<String> storeCreateTableDdls()

返回 storeCreateTableDdls 结果。

Returns the store create table ddls.

返回Returns List<String>
返回列出。Returns list.
源码Source io/agentscope/extensions/jdbc/dialect/vendor/SqliteDialect.java:41–61

storeUpsert

public BoundSql storeUpsert(String namespacePath, String key, String json, long timestamp)

执行 storeUpsert 方法。

Performs the store upsert operation.

参数Parameters
名称Name类型Type说明Description
namespacePathString命名空间路径(类型 `String`)。The namespace path.
keyString键(类型 `String`)。The key.
jsonStringJSON(类型 `String`)。The json.
timestamplong时间戳(类型 `long`)。The timestamp.
返回Returns BoundSql
返回BoundSql。Returns bound sql.
源码Source io/agentscope/extensions/jdbc/dialect/vendor/SqliteDialect.java:63–78

sessionStateCreateTableDdls

public List<String> sessionStateCreateTableDdls()

返回 sessionStateCreateTableDdls 结果。

Returns the session state create table ddls.

返回Returns List<String>
返回列出。Returns list.
源码Source io/agentscope/extensions/jdbc/dialect/vendor/SqliteDialect.java:84–104

sessionStateUpsert

public BoundSql sessionStateUpsert(String sessionId, String stateKey, int itemIndex, String stateData)

执行 sessionStateUpsert 方法。

Performs the session state upsert operation.

参数Parameters
名称Name类型Type说明Description
sessionIdString会话标识(类型 `String`)。The session id.
stateKeyString状态键(类型 `String`)。The state key.
itemIndexint条目索引(类型 `int`)。The item index.
stateDataString状态数据(类型 `String`)。The state data.
返回Returns BoundSql
返回BoundSql。Returns bound sql.
源码Source io/agentscope/extensions/jdbc/dialect/vendor/SqliteDialect.java:106–121

sessionStateCheckTableExists

public BoundSql sessionStateCheckTableExists(String tableName)

设置该参数。

Performs the session state check table exists operation.

参数Parameters
名称Name类型Type说明Description
tableNameStringtable 名称(类型 `String`)。The table name.
返回Returns BoundSql
返回BoundSql。Returns bound sql.
源码Source io/agentscope/extensions/jdbc/dialect/vendor/SqliteDialect.java:123–127

snapshotCreateTableDdls

public List<String> snapshotCreateTableDdls()

返回 snapshotCreateTableDdls 结果。

Returns the snapshot create table ddls.

返回Returns List<String>
返回列出。Returns list.
源码Source io/agentscope/extensions/jdbc/dialect/vendor/SqliteDialect.java:133–143

snapshotUpsert

public BoundSql snapshotUpsert(String snapshotId, InputStream data)

执行 snapshotUpsert 方法。

Performs the snapshot upsert operation.

参数Parameters
名称Name类型Type说明Description
snapshotIdString快照标识(类型 `String`)。The snapshot id.
dataInputStream数据(类型 `InputStream`)。The data.
返回Returns BoundSql
返回BoundSql。Returns bound sql.
源码Source io/agentscope/extensions/jdbc/dialect/vendor/SqliteDialect.java:145–155

supports

public boolean supports(DatabaseMetaData metaData) throws SQLException

设置支持。

Performs the supports operation.

参数Parameters
名称Name类型Type说明Description
metaDataDatabaseMetaData元数据(类型 `DatabaseMetaData`)。The meta data.
返回Returns boolean
返回布尔值,表示判断结果。Returns a boolean result.
抛出Throws
  • SQLException 可能抛出 `SQLException`。Thrown when the operation cannot be completed.
源码Source io/agentscope/extensions/jdbc/dialect/vendor/SqliteDialect.java:161–164

继承成员Inherited Members

继承自Methods inherited from SnapshotDialect
基于官方固定版本源码静态生成Generated from pinned official sources · Python 2.0.11 · Java 2.0.4
签名与文档为静态抽取;如有疑问请以源码为准。Signatures and docs are extracted statically; verify against the source when in doubt.