修改密码

请输入密码
请输入密码 请输入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

搜索
    中文

      属性管理

      GetProperty()

      方法及相关类:

      GetProperty(schemaName string, 
      			propertyName string, 
                  dbType ultipa.DBType, 
                  config *configuration.RequestConfig
      ) (property *structs.Property, err error)
      

      示例:获取 test 图集的点属性 @client.level 和边属性 @transfer.amount

      func TestMisc(t *testing.T) {
          // 创建名为 conn 的连接并使用 default 图集,此部分代码省略
      
        	requestConfig := &configuration.RequestConfig{
      		GraphName: "test",
      	}
        
      	nodeProp, _ := conn.GetProperty("client", "level", ultipa.DBType_DBNODE, requestConfig)
      	fmt.Println(nodeProp)
      	edgeProp, _ := conn.GetProperty("transfer", "amount", ultipa.DBType_DBEDGE, requestConfig)
      	fmt.Println(edgeProp)
      

      GetNodeProperty() | GetEdgeProperty()

      方法及相关类:

      GetNodeProperty(schemaName string, 
      				propertyName string, 
                      config *configuration.RequestConfig
      ) (property *structs.Property, err error)
      
      GetEdgeProperty(schemaName string, 
      				propertyName string, 
                      config *configuration.RequestConfig
      ) (property *structs.Property, err error)
      

      示例:获取 test 图集的点属性 @client.level 和边属性 @transfer.amount

      func TestMisc(t *testing.T) {
          // 创建名为 conn 的连接并使用 default 图集,此部分代码省略
      
        	requestConfig := &configuration.RequestConfig{
      		GraphName: "test",
      	}
        
      	nodeProp, _ := conn.GetNodeProperty("client", "level", requestConfig)
      	fmt.Println(nodeProp)
      	edgeProp, _ := conn.GetEdgeProperty("transfer", "amount", requestConfig)
      	fmt.Println(edgeProp)
      

      CreateProperty()

      方法及相关类:

      CreateProperty(schemaName string, 
      			   dbType ultipa.DBType, 
                     prop *structs.Property, 
                     conf *configuration.RequestConfig
      ) (resp *http.UQLResponse, err error)
      
      Property struct {
      	Name   string
      	Desc   string
      	Lte    bool
      	Schema string
      	Type   ultipa.PropertyType
      }
      

      示例:为图集 test 创建边属性 @transfer.amount,类型为浮点型,设置描述为 transaction amount

      func TestMisc(t *testing.T) {
          // 创建名为 conn 的连接并使用 default 图集,此部分代码省略
      
        	requestConfig := &configuration.RequestConfig{
      		GraphName: "test",
      	}
        
      	property := &structs.Property{
      		Name: "amount",
      		Desc: "transaction amount",
      		Type: ultipa.PropertyType_FLOAT,
      	}
      
      	resp, _ := conn.CreateProperty("transfer", ultipa.DBType_DBEDGE, property, requestConfig)
      	log.Println(resp)
      }
      

      CreateNodeProperty() | CreateEdgeProperty()

      方法及相关类:

      CreateNodeProperty(schemaName string, 
      				   prop *structs.Property, 
                         conf *configuration.RequestConfig
      ) (resp *http.UQLResponse, err error)
      
      CreateEdgeProperty(schemaName string, 
      				   prop *structs.Property, 
                         conf *configuration.RequestConfig
      ) (resp *http.UQLResponse, err error)
      
      Property struct {
      	Name   string
      	Desc   string
      	Lte    bool
      	Schema string
      	Type   ultipa.PropertyType
      }
      

      示例:为图集 test 创建边属性 @transfer.amount,类型为浮点型,设置描述为 transaction amount

      func TestMisc(t *testing.T) {
          // 创建名为 conn 的连接并使用 default 图集,此部分代码省略
      
        	requestConfig := &configuration.RequestConfig{
      		GraphName: "test",
      	}
        
      	property := &structs.Property{
      		Name: "amount",
      		Desc: "transaction amount",
      		Type: ultipa.PropertyType_FLOAT,
      	}
      
      	resp, _ := conn.CreateEdgeProperty("transfer", property, requestConfig)
      	log.Println(resp)
      }
      

      CreatePropertyIfNotExist()

      方法及相关类:

      CreatePropertyIfNotExist(schemaName string, 
      						 dbType ultipa.DBType, 
                               prop *structs.Property, 
                               config *configuration.RequestConfig
      ) (exist bool, err error)
      
      Property struct {
      	Name   string
      	Desc   string
      	Lte    bool
      	Schema string
      	Type   ultipa.PropertyType
      }
      

      示例:创建属性时,如果该属性已存在则返回 true,否则返回 false 并创建

      func TestMisc(t *testing.T) {
          // 创建名为 conn 的连接并使用 default 图集,此部分代码省略
      
        	requestConfig := &configuration.RequestConfig{
      		GraphName: "test",
      	}
        
      	property := &structs.Property{
      		Name: "amount",
      		Desc: "transaction amount",
      		Type: ultipa.PropertyType_FLOAT,
      	}
        
      	isExist, _ := conn.CreatePropertyIfNotExist("transfer", ultipa.DBType_DBEDGE, property, requestConfig)
      	log.Println(isExist)
      }
      

      AlterNodeProperty() | AlterEdgeProperty()

      方法及相关类:

      AlterNodeProperty(propertyName string, 
      				  prop *structs.Property, 
                        config *configuration.RequestConfig
      ) (resp *http.UQLResponse, err error)
      
      AlterEdgeProperty(propertyName string, 
      				  prop *structs.Property, 
                        config *configuration.RequestConfig
      ) (resp *http.UQLResponse, err error)
      
      Property struct {
      	Name   string
      	Desc   string
      	Lte    bool
      	Schema string
      	Type   ultipa.PropertyType
      }
      

      示例:对图集 test 的点属性 @client.level 以及边属性 @transfer.type 做适当修改

      func TestMisc(t *testing.T) {
          // 创建名为 conn 的连接并使用 default 图集,此部分代码省略
      
        	requestConfig := &configuration.RequestConfig{
      		GraphName: "test",
      	}
        
      	nodeProp := &structs.Property{
      		Name: "grade",
      		Desc: "client grade",
      	}
      	resp1, _ := conn.AlterNodeProperty("@client.level", nodeProp, requestConfig)
      	log.Println(resp1)
      
      	edgeProp := &structs.Property{
      		Name: "category",
      		Desc: "transfer category",
      	}
      	resp2, _ := conn.AlterEdgeProperty("@transfer.type", edgeProp, requestConfig)
      	log.Println(resp2)  
      }
      

      DropNodeProperty() | DropEdgeProperty()

      方法及相关类:

      DropNodeProperty(propertyName string, config *configuration.RequestConfig) (resp *http.UQLResponse, err error)
      
      DropEdgeProperty(propertyName string, config *configuration.RequestConfig) (resp *http.UQLResponse, err error)
      

      示例:删除图集 test 的点属性 @client.grade 以及边属性 @transfer.category

      func TestMisc(t *testing.T) {
          // 创建名为 conn 的连接并使用 default 图集,此部分代码省略
      
        	requestConfig := &configuration.RequestConfig{
      		GraphName: "test",
      	}
        
      	resp1, _ := conn.DropNodeProperty("@client.grade", requestConfig)
      	log.Println(resp1)
      
      	resp2, _ := conn.DropEdgeProperty("@transfer.category", requestConfig)
      	log.Println(resp2)
      }
      
      请完成以下信息后可下载此书
      *
      公司名称不能为空
      *
      公司邮箱必须填写
      *
      你的名字必须填写
      *
      你的电话必须填写
      *
      你的电话必须填写