showSchema()
Method and class:
def showSchema(self,
request: ULTIPA_REQUEST.ShowSchema = None,
requestConfig: ULTIPA_REQUEST.RequestConfig = ULTIPA_REQUEST.RequestConfig()
) -> ULTIPA_RESPONSE.UltipaResponse
class ShowSchema(self, type: ULTIPA.DBType = None, schema: str = None)
Example: Acquire the information of all schemas of graphset 'test'
from ultipa import Connection, UltipaConfig, RequestConfig
# omit code of establishing server connection 'conn' using graphset 'default'
req = conn.showSchema(requestConfig = RequestConfig("test"))
req.Print()
Example: Acquire the information of all edge schemas of graphset 'test'
from ultipa import Connection, UltipaConfig, RequestConfig
from ultipa import ULTIPA_REQUEST, ULTIPA
# omit code of establishing server connection 'conn' using graphset 'default'
req = conn.showSchema(
ULTIPA_REQUEST.ShowSchema(ULTIPA.DBType.DBEDGE),
RequestConfig("test")
)
req.Print()
Example: Acquire the information of node schema 'account' of graphset 'test'
from ultipa import Connection, UltipaConfig, RequestConfig
from ultipa import ULTIPA_REQUEST, ULTIPA
# omit code of establishing server connection 'conn' using graphset 'default'
req = conn.showSchema(
ULTIPA_REQUEST.ShowSchema(ULTIPA.DBType.DBNODE, "account"),
RequestConfig("test")
)
req.Print()
createSchema()
Method and class:
def showSchema(self,
request: ULTIPA_REQUEST.CreateSchema,
requestConfig: ULTIPA_REQUEST.RequestConfig = ULTIPA_REQUEST.RequestConfig()
) -> ULTIPA_RESPONSE.UltipaResponse
class CreateSchema:
def __init__(self, name: str, type: ULTIPA.DBType, description: str = None)
Example: Create node schema 'card' for graphset 'test', with description 'bank card'
from ultipa import Connection, UltipaConfig, RequestConfig
from ultipa import ULTIPA_REQUEST, ULTIPA
# omit code of establishing server connection 'conn' using graphset 'default'
req = conn.createSchema(
ULTIPA_REQUEST.CreateSchema("card", ULTIPA.DBType.DBNODE, "bank card"),
RequestConfig("test"))
req.Print()
alterSchema()
Method and class:
def alterSchema(self,
request: ULTIPA_REQUEST.AlterSchema,
requestConfig: ULTIPA_REQUEST.RequestConfig = ULTIPA_REQUEST.RequestConfig()
) -> ULTIPA_RESPONSE.UltipaResponse
class AlterSchema:
def __init__(self, type: ULTIPA.DBType, schema: str, newName: str, newDescription: str = '')
Example: Modify node schema 'people' of graphset 'test' with new name 'customer' and new description 'bank customer'
from ultipa import Connection, UltipaConfig, RequestConfig
from ultipa import ULTIPA_REQUEST, ULTIPA
# omit code of establishing server connection 'conn' using graphset 'default'
req = conn.alterSchema(
ULTIPA_REQUEST.AlterSchema(ULTIPA.DBType.DBNODE, "people", "customer", "bank customer"),
RequestConfig("test"))
req.Print()
dropSchema()
Method and class:
def dropSchema(self,
request: ULTIPA_REQUEST.DropSchema,
requestConfig: ULTIPA_REQUEST.RequestConfig = ULTIPA_REQUEST.RequestConfig()
) -> ULTIPA_RESPONSE.UltipaResponse
class DropSchema:
def __init__(self, type: ULTIPA.DBType, schema: str)
Example: Delete edge schema 'manage' from graphset 'test'
from ultipa import Connection, UltipaConfig, RequestConfig
from ultipa import ULTIPA_REQUEST, ULTIPA
# omit code of establishing server connection 'conn' using graphset 'default'
req = conn.dropSchema(ULTIPA_REQUEST.DropSchema(ULTIPA.DBType.DBEDGE,"manage"),
RequestConfig("test"))
req.Print()