ISMESchema
used for data model creation and querying
constructor
Type
class ISMESchema {
constructor(client: ISMEClient, did?: ISMEDID)
}
info
To create an instance, you need to pass in client
, or you can create it directly by client.schema()
Method
create
create a data model
Type
class ISMESchema {
create(options: {
name: string
description: string
schema: JSONSchema7Definition
}): Promise<{
modelName: string
}>
}
Parameters
name
: the name of the data model, globally uniquedescription
: information descriptionschema
: JSON Schema of the data model
Details
If the model is created successfully, it will return the name
of the model. Before creating it, make sure that the current client.did
is already in the logged-in state.
get
Query the details of a schema
Type
class ISMESchema {
get(name: string): Promise<any>
}