修改密码

请输入密码
请输入密码 请输入8-64长度密码 和 email 地址不相同 至少包括数字、大写字母、小写字母、半角符号中的 3 个
请输入密码
提交

修改昵称

当前昵称:
提交

申请证书

证书详情

Please complete this required field.

  • Ultipa Graph V4

Standalone

Please complete this required field.

Please complete this required field.

服务器的MAC地址

Please complete this required field.

Please complete this required field.

取消
申请
ID
产品
状态
核数
申请天数
审批时间
过期时间
MAC地址
申请理由
审核信息
关闭
基础信息
  • 用户昵称:
  • 手机号:
  • 公司名称:
  • 公司邮箱:
  • 地区:
  • 语言:
修改密码
申请证书

当前未申请证书.

申请证书
Certificate Issued at Valid until Serial No. File
Serial No. Valid until File

Not having one? Apply now! >>>

ProductName CreateTime ID Price File
ProductName CreateTime ID Price File

No Invoice

搜索
    中文

      连接与初始化

      连接配置

      与 Ultipa Graph 建立连接、发送请求时的配置项:

      配置项 类型 说明
      Hosts []string Ultipa 数据库集群地址列表
      Username string 用户名
      Password string 密码
      DefaultGraph string 建立连接时使用的图集名,通常为默认图集 default
      MaxRecvSIze int 接收数据的最大字节数
      Consistency bool 是否使用读一致性
      CurrentGraph string 运行时使用的图集名
      Timeout uint32 发送请求时的超时时间(秒)
      Debug bool 是否使用 debug 模式
      HeartBeat int 所有实例的心跳时间(秒),0 则为关闭心跳时间

      创建 Ultipa Client 连接

      // 创建一个连接配置
      config := configuration.NewUltipaConfig(&configuration.UltipaConfig{
          Hosts: []string{"10.0.0.1:60061", "10.0.0.2:60061", "10.0.0.3:60061"},
          Username: "root",
          Password: "root",
      })
      
      // 获取 Ultipa Client 连接实例
      client, err := sdk.NewUltipa(config)
      

      请求配置

      可以在任何一个 request API 中修改请求配置,可修改如下配置项:

      配置项 类型 说明
      GraphName string 当前图集名
      Timeout uint32 超时时间(秒)
      Host string 向该主机发送请求
      UseMaster bool 是否使用 leader 来保证读一致性
      InsertType ultipa.InsertType 插入方式,InsertType_NORMAL, InsertType_OVERWRITE, InsertType_UPSERT
      CreateNodeIfNotExist bool 插入边时如果边的端点不存在,是否自动创建该点

      // 使用当前的连接配置作为请求配置,发送 UQL 请求
      resp, _ := client.UQL("find().nodes() as nodes return nodes limit 10", nil)
      
      // 将超时时间修改为 20 秒,并发送 UQL 请求
      rConfig := &configuration.RequestConfig{
          Timeout: 20,
      }
      
      resp2, _ := client.UQL("find().nodes() as nodes return nodes limit 10", rConfig)
      
      请完成以下信息后可下载此书
      *
      公司名称不能为空
      *
      公司邮箱必须填写
      *
      你的名字必须填写
      *
      你的电话必须填写
      *
      你的电话必须填写