- Notifications
You must be signed in to change notification settings - Fork2
License
NotificationsYou must be signed in to change notification settings
baidu/mochow-sdk-java
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
针对百度智能云向量数据库,我们推出了一套 JAVA SDK(下称Mochow SDK),方便用户通过代码调用百度向量数据库。
使用Maven安装在Maven的pom.xml文件中添加mochow-sdk-java的依赖:
<dependency> <groupId>com.baidu</groupId> <artifactId>mochow-sdk-java</artifactId> <version>{version}</version></dependency>
JAVA SDK可以在Java1.7,Java1.8环境下运行。
在使用Mochow SDK 之前,用户需要在百度智能云上创建向量数据库,以获得 API Key。API Key 是用户在调用Mochow SDK 时所需要的凭证。具体获取流程参见平台的向量数据库使用说明文档。
获取到 API Key 后,用户还需要传递它们来初始化Mochow SDK。 可以通过如下方式初始化Mochow SDK:
importcom.baidu.mochow.auth.Credentials;importcom.baidu.mochow.client.ClientConfiguration;importcom.baidu.mochow.client.MochowClient;publicclassMain {publicstaticvoidmain(String[]args) {Stringaccount ="root";StringapiKey ="your_api_key";Stringendpoint ="your_service_endpoint";// example: 127.0.0.1:5287// 创建Mochow服务的ClientClientConfigurationclientConfiguration =newClientConfiguration();clientConfiguration.setCredentials(newCredentials(account,apiKey));clientConfiguration.setEndpoint(endpoint);MochowClientmochowClient =newMochowClient(clientConfiguration);// 创建databasemochowClient.createDatabase("your_database_name"); }}
目前Mochow SDK 支持用户使用如下功能:
- Databse 操作
- Table 操作
- Alias 操作
- Index 操作
- Row 操作
Apache-2.0
About
No description, website, or topics provided.
Resources
License
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Packages0
No packages published
Uh oh!
There was an error while loading.Please reload this page.
Contributors2
Uh oh!
There was an error while loading.Please reload this page.