Class: DataBase

DataBase()

new DataBase()

数据库对象
Source:

Methods

(async, static) close() → {Promise}

关闭数据库
Source:
Returns:
成功:>0;失败:<=0
Type
Promise

(async, static) create(strDatabasePath) → {Promise}

创建数据库
Parameters:
Name Type Description
strDatabasePath 数据库文件路径
Source:
Returns:
成功:>0;失败:<=0
Type
Promise

(async, static) createObj() → {Promise.<DataBase>}

构造一个新的 DataBase 对象。
Source:
Returns:
数据库对象
Type
Promise.<DataBase>

(async, static) getFullName() → {Promise}

获取数据库全路径
Source:
Returns:
数据库名称
Type
Promise

(async, static) getName() → {Promise}

获取数据库名称
Source:
Returns:
数据库名称
Type
Promise

(async, static) getXclseIDs(type, dsID) → {Promise.<Array>}

获取数据库内指定类类型的所有类ID
Parameters:
Name Type Description
type 类类型
dsID 要素集ID
Source:
Returns:
所有类ID
Type
Promise.<Array>

(async, static) getXclsInfo(type, clsID) → {Promise.<XClsInfo>}

获取类信息
Parameters:
Name Type Description
type 类类型
clsID 类ID
Source:
Returns:
类信息
Type
Promise.<XClsInfo>

(async, static) getXclsName(type, xclsID) → {Promise}

获取类名称
Parameters:
Name Type Description
type 类类型
xclsID 类ID
Source:
Returns:
类名称
Type
Promise

(async, static) getXclsNum(type) → {Promise}

获取指定类类型的类的数目
Parameters:
Name Type Description
type 类类型
Source:
Returns:
类的数目
Type
Promise

(async, static) hasOpened() → {Promise}

返回数据库的打开标志
Source:
Returns:
是否打开
Type
Promise

(async, static) open(数据库文件路径) → {Promise}

打开数据库
Parameters:
Name Type Description
数据库文件路径
Source:
Returns:
成功:>0;失败:<=0
Type
Promise

(async, static) updateAsync(strUpdateDatabasePath, name) → {Promise.<void>}

导入更新包进行数据更新(目前仅支持桌面编辑后的全量图层更新)
Parameters:
Name Type Description
strUpdateDatabasePath 更新包全路径
name 类名称
Source:
Returns:
Type
Promise.<void>

(async, static) xClsIsExist(type, name) → {Promise}

查看指定类类型和类名称的类在数据库中是否存在,如果存在,返回其ID
Parameters:
Name Type Description
type number 类类型
name String 类名称
Source:
Returns:
成功:类ID;失败:<=0
Type
Promise