跳到主要内容
版本:V1.1.0

API 参考

seekdb 支持通过 API 以编程的方式来使用 seekdb。

API 接口

目前支持以下 API 接口。

Database

信息

仅支持在使用 SeekdbAdminClient 连接时,才能使用该接口。关于 SeekdbAdminClient 的详细介绍,参见 SeekdbAdminClient

API 接口描述相关文档链接
createDatabase()创建数据库。文档
getDatabase()获取指定数据库。文档
listDatabases()获取实例中数据库列表。文档
deleteDatabase()删除指定数据库。文档

Collection

信息

仅支持在使用 SeekdbClient 连接时,才能使用该接口。关于 SeekdbClient 的详细介绍,参见 SeekdbClient

API 接口描述相关文档链接
createCollection()创建 collection。文档
getCollection()获取指定 collection。文档
getOrCreateCollection()创建或者查询 Collection,如果数据库中 Collection 不存在,则创建;如果存在 Collection,则获取相应的结果。文档
fork()复制指定的 Collection,以创建具有相同数据的新 Collection。文档
listCollections()获取数据库 collection 列表。文档
countCollection()统计数据库中的 Collection 数量文档
hasCollection()检查指定的 Collection 在数据库中是否存在文档
deleteCollection()删除指定 collection。文档

DML

信息

仅支持在使用 SeekdbClient 连接时,才能使用该接口。关于 SeekdbClient 的详细介绍,参见 SeekdbClient

API 接口描述相关文档链接
add()将新记录插入到 collection 中。文档
update()更新 collection 中的现有记录。文档
upsert()插入新记录或更新现有记录。文档
delete()从 collection 中删除记录。文档

DQL

信息

仅支持在使用 SeekdbClient 连接时,才能使用该接口。关于 SeekdbClient 的详细介绍,参见 SeekdbClient

API 接口描述相关文档链接
query()向量相似度搜索方法。文档
get()使用 ID、document 和 metadata(非矢量)从表中查询特定数据。文档
hybridSearch()全文搜索和向量相似度搜索,采用排名法。文档