oaLibDMData
模块: oapy._oa._dm
导入: from oapy._oa import _dm
概览
oaLibDMData 在 oapy 中可用,可通过 _dm 模块访问。
本页汇总 oaLibDMData 当前在 oapy 中可用的 Python 接口。
详细说明
oaLibDMData objects represent database objects that can be associated with a DM library and can be used to persistently store properties ( oaProp objects), groups ( oaGroup objects), group members ( oaGroupMember objects) and application objects (see oaAppObject )。 The oaDMData class can be observed by deriving from oaObserver
方法总览
| 状态 | Python 调用 |
|---|---|
| ✅ | _dm.oaLibDMData.open(libName, mode) |
| ✅ | _dm.oaLibDMData.recover(libName, saveRecoverType) |
| ✅ | _dm.oaLibDMData.find(libName) |
| ✅ | _dm.oaLibDMData.exists(libName) |
| ✅ | _dm.oaLibDMData.exists(libName, saveRecoverType) |
| ✅ | _dm.oaLibDMData.destroy(libName) |
| ✅ | _dm.oaLibDMData.destroy(libName, saveRecoverType) |
方法说明
_dm.oaLibDMData.open(libName, mode)
绑定状态: 已绑定
Python 调用: _dm.oaLibDMData.open(libName, mode)
This function attempts to open the oaLibDMData object for the library with the specified name in the specified mode。 If the specified mode is a write-access mode ('a'ppend or 'w'rite mode) and the oaLibDMData does not exist, it will be created。 If the specified mode is a read-access mode ('r'ead-only mode) and the oaLibDMData does not exist, an oacDMDataDoesNotExist exception will be thrown。 If successful, a pointer to the LibDMData object is returned。
参数
libName: name of the library associated with the DMData。mode: 'read-only,' 'a'ppend, or 'w'rite mode in which to access the DMData; 'a'ppend and 'w'rite mode attempt to obtain write access to data; 'a'ppend retains any existing LibDMData; while'w'rite deletes (truncates) any existing DMData。
异常
oacOpenUndefinedModeDMData: The specified mode is invalid。oacLibNotFound: the library with the specified name could not be found。oacOpenOnDMDataBeingPurged: attempt to open DMData while DMData is being purged。oacDMDataCannotGetReadAccess: requested read access to the DMData could not be obtained。oacDMDataHasReadNeedWriteAccess: write access was requested but read access exists on DMData。oacDMDataCannotGetWriteAccess: requested write access to the DMData could not be obtained。oacDMDataDoesNotExist: read access requested, but DMData does not exist。oacCannotLockDMData: write access specified, but cannot get a write lock on the file。
Python 示例
from oapy._oa import _dm
_dm.oaLibDMData.open(libName, mode)
_dm.oaLibDMData.recover(libName, saveRecoverType)
绑定状态: 已绑定
Python 调用: _dm.oaLibDMData.recover(libName, saveRecoverType)
This function attempts to recover the DM data for the given library name with the specified oaSaveRecoverType 。 If successful, a pointer to the oaLibDMData object is returned。
参数
libName: The name of the library。saveRecoverType: Either oacAutoSaveType or oacCriticalSaveType。
异常
oacLibNotFound。oacSaveRecoverDMDataFileAlreadyOpened。oacOpenOnDMDataBeingPurged。oacDMDataDoesNotExist。oacSaveRecoverFileDoesNotExistOnDisk。oacInterfaceException。
Python 示例
from oapy._oa import _dm
_dm.oaLibDMData.recover(libName, saveRecoverType)
_dm.oaLibDMData.find(libName)
绑定状态: 已绑定
Python 调用: _dm.oaLibDMData.find(libName)
This function attempts to find and open the oaLibDMData for the named library。 If successful, a pointer to the oaLibDMData object is returned; otherwise, NULL is returned。
参数
libName: name of the library associated with the DMData。
Python 示例
from oapy._oa import _dm
_dm.oaLibDMData.find(libName)
_dm.oaLibDMData.exists(libName)
绑定状态: 已绑定
Python 调用: _dm.oaLibDMData.exists(libName)
This function returns a boolean that indicates whether the specified oaSaveRecoverType file exists on-disk。
参数
libName: The name of the library。saveRecoverType: Either oacAutoSaveType or oacCriticalSaveType。
Python 示例
from oapy._oa import _dm
_dm.oaLibDMData.exists(libName)
_dm.oaLibDMData.exists(libName, saveRecoverType)
绑定状态: 已绑定
Python 调用: _dm.oaLibDMData.exists(libName, saveRecoverType)
This function returns true if there is an oaLibDMData object open for the given library or if an oaLibDMData file exists on disk with a non-zero size。
参数
libName: name of the library associated with the DMData。
Python 示例
from oapy._oa import _dm
_dm.oaLibDMData.exists(libName, saveRecoverType)
_dm.oaLibDMData.destroy(libName)
绑定状态: 已绑定
Python 调用: _dm.oaLibDMData.destroy(libName)
This function attempts to remove the specified oaSaveRecoverType file from disk。 It throws an exception if this file cannot be found on disk。
参数
libName: The name of the library。saveRecoverType: Either oacAutoSaveType or oacCriticalSaveType。
异常
oacLibNotFound。oacDestroyDMDataDoesNotExist。oacSaveRecoverFileDoesNotExistOnDisk。oacInterfaceException。
Python 示例
from oapy._oa import _dm
_dm.oaLibDMData.destroy(libName)
_dm.oaLibDMData.destroy(libName, saveRecoverType)
绑定状态: 已绑定
Python 调用: _dm.oaLibDMData.destroy(libName, saveRecoverType)
This function attempts to remove this oaLibDMData from disk。 It throws an exception if the oaLibDMData is currently open or if the oaLibDMData cannot be found on disk。
参数
libName: name of the library associated with the DMData。
异常
oacLibNotFound: the library with the specified name cannot be found。oacDestroyDMDataOpen: the DMData is open。oacDMDataCannotGetWriteAccess: cannot get write access to the DMData。oacDestroyDMDataDoesNotExist: the DM Data does not exist on disk。
Python 示例
from oapy._oa import _dm
_dm.oaLibDMData.destroy(libName, saveRecoverType)