Change Password

Input error
Input error
Input error
Submit

Change Nickname

Current Nickname:
Submit
v4.0

Deletion

Delete Node

  • The Connection object provides method deleteNode to delete node.

    from ultipa import Connection, ULTIPA_REQUEST, ULTIPA
    conn = Connection(host='host:port', username="root", password="root")
    # Delete a node by specifying uuid
    ret = conn.deleteNode(ULTIPA_REQUEST.DeleteNode(uuid=4))
    # Delete nodes by specifying filtering conditions
    nodeFilter = ULTIPA_REQUEST.UltipaFilter(schema='default',
      		filterType=FilterEnum.EQ, property='name', value="test")
    ret = conn.deleteNode(ULTIPA_REQUEST.DeleteNode(filter=nodeFilter))
    print(ret.toJSON())
    

Delete Edge

  • The Connection object provides method deleteEdge to delete edge.

    from ultipa import Connection, ULTIPA_REQUEST, ULTIPA
    conn = Connection(host='host:port', username="root", password="root")
    # Delete an edge by specifying uuid
    ret = conn.deleteEdge(ULTIPA_REQUEST.DeleteEdge(uuid=1))
    # Delete edges by specifying filtering conditions
    edgeFilter = ULTIPA_REQUEST.UltipaFilter(schema='default',
      		filterType=FilterEnum.EQ, property='name', value="test")
    ret = conn.deleteEdge(ULTIPA_REQUEST.DeleteEdge(filter=edgeFilter))
    print(ret.toJSON())
    

Truncate Data

  • The Connection object provides method truncate to clear data from schema or graph level.

    • Clear node data of a certain graphset
    from ultipa import Connection, ULTIPA_REQUEST, ULTIPA
    conn = Connection(host='host:port', username="root", password="root")
    # Delete nodes of 'test' from graphset 'default'
    # Note: edges connecting to the nodes-to-be-deleted will also be deleted
    ret = conn.truncate(ULTIPA_REQUEST.Truncate(graph="default", schema="test",
                                                truncateType=ULTIPA.TruncateType.NODES))
    print(ret.toJSON())
    
    • Clear edge data of a certain graphset
    from ultipa import Connection, ULTIPA_REQUEST, ULTIPA
    conn = Connection(host='host:port', username="root", password="root")
    # Delete egdes of 'test' from graphset 'default'
    # Note: deletion of edges will not affect nodes
    ret = conn.truncate(ULTIPA_REQUEST.Truncate(graph="default", schema="test",
                                                truncateType=ULTIPA.TruncateType.EDGES))
    print(ret.toJSON())
    
    • Clear all data (nodes and edges) of a certain graphset
    from ultipa import Connection, ULTIPA_REQUEST, ULTIPA
    conn = Connection(host='host:port', username="root", password="root")
    ret = conn.truncate(ULTIPA_REQUEST.Truncate(graph="default", allData=True))
    print(ret.toJSON())
    

Compact Disk

  • The Connection object provides method compact to clear disk fragments.

    from ultipa import Connection, ULTIPA_REQUEST, ULTIPA
    conn = Connection(host='host:port', username="root", password="root")
    ret = conn.compact(ULTIPA_REQUEST.Graph(graph="default"))
    print(ret.toJSON())
    
Please complete the following information to download this book
*
公司名称不能为空
*
公司邮箱必须填写
*
你的名字必须填写
*
你的电话必须填写
*
你的电话必须填写