UNPKG

@ultipa-graph/ultipa-node-sdk

Version:

NodeJS SDK for ultipa-server 4.0

80 lines (79 loc) 3.34 kB
import { ConnectionBase } from "./connection.base"; import { RequestType, ResponseType, ULTIPA } from "../../types"; export declare class PropertyExtra extends ConnectionBase { /** * 得到点边的属性 */ showAllProperty(commonReq?: RequestType.RequestConfig): Promise<ULTIPA.Response<ResponseType.AllProperty>>; /** * 得到点或者边的属性 */ showProperty(dbType: ULTIPA.DBType, schemaName: string, requestConfig?: RequestType.RequestConfig): Promise<ULTIPA.Response<ResponseType.Property[]>>; /** * 得到点的属性 */ showNodeProperty(schemaName: string, requestConfig?: RequestType.RequestConfig): Promise<ULTIPA.Response<ResponseType.Property[]>>; /** * 得到边的属性 */ showEdgeProperty(schemaName: string, requestConfig?: RequestType.RequestConfig): Promise<ULTIPA.Response<ResponseType.Property[]>>; /** * 获取单个属性 * @param dbType * @param schemaName * @param propertyName * @param requestConfig */ private getSingleProperty; /** * 获取属性 * @param dbType: DBType * @param schemaName: String * @param propertyName: String * @param requestConfig: RequestConfig */ getProperty(dbType: ULTIPA.DBType, schemaName: string, propertyName: string, requestConfig?: RequestType.RequestConfig): Promise<ULTIPA.Response<ResponseType.Property>>; /** * 获取点某个属性 */ getNodeProperty(schemaName: string, propertyName: string, requestConfig?: RequestType.RequestConfig): Promise<ULTIPA.Response<ResponseType.Property>>; /** * 获取边某个属性 * @param req * @param commonReq */ getEdgeProperty(schemaName: string, propertyName: string, requestConfig?: RequestType.RequestConfig): Promise<ULTIPA.Response<ResponseType.Property>>; /** * 属性是否存在 * @param req * @param commonReq * @private */ private hasProperty; /** * 创建点或者边属性 */ createProperty(dbType: ULTIPA.DBType, schemaName: string, prop: RequestType.Property, requestConfig?: RequestType.RequestConfig): Promise<ULTIPA.Response<null>>; /** * 不存在,再创建属性 * @param req * @param commonReq */ createPropertyIfNotExist(dbType: ULTIPA.DBType, schemaName: string, prop: RequestType.Property, requestConfig?: RequestType.RequestConfig): Promise<ULTIPA.Response<Boolean>>; /** * 删除点或者边属性 */ dropProperty(dbType: ULTIPA.DBType, schemaName: string, propertyName: string, requestConfig?: RequestType.RequestConfig): Promise<ULTIPA.Response<null>>; /** * 更新点或者边属性 */ alterProperty(dbType: ULTIPA.DBType, property: RequestType.Property, newProperty: RequestType.Property, requestConfig?: RequestType.RequestConfig): Promise<ULTIPA.Response<null>>; /** * 加载点或边属性到引擎(LTE) */ lte(dbType: ULTIPA.DBType, schemaName: string, propertyName: string, requestConfig?: RequestType.RequestConfig): Promise<ULTIPA.Response<null>>; /** * 卸载引擎的点或边属性(UFE) */ ufe(dbType: ULTIPA.DBType, schemaName: string, propertyName: string, requestConfig?: RequestType.RequestConfig): Promise<ULTIPA.Response<null>>; }