Dql汇总

1.得到一个文件柜下的所有文档(包括版本)

select * from dm_document(all) where folder('/Temp',descend)

若获得文件柜下的当前版本文档:

select * from dm_document where folder('/Temp',descend)

2.通过i_chronicle_id字段可以得到该文档的根版本,即升级前的原始版本

select r_object_id,i_chronicle_id,object_name from dm_document(all) where folder('/ProjectFile',descend)

3.判断一个文档是否为虚拟文档的一部分(component_idcomponentChronicle ID)

 select object_name,r_object_id from dm_sysobject where r_object_id in(select parent_id from dmr_containment where component_id=(select i_chronicle_id from dm_sysobject where r_object_id='child-object-id'))

4.清除收件箱

 delete dmi_queue_item objects where delete_flag=0

5.获取某一类型的必备属性, r_component_id 即为组件对象r_object_id

 select attr_name from dmi_dd_attr_info where type_name='dm_folder' and is_required<>0

6.获取工作流attachements

 select r_component_id,r_component_name from dmi_wf_attachment where r_workflow_id='4d0003e880001229'

7.返回前10条数据

 select * from dm_document enable(return_top 10)

8.获取工作流信息

 select task_name,task_state,* from dmi_queue_item where router_id=’workflowId’

9.显示docbrokers

 Execute list_targets

10.查询active workflows

      select * from dm_document where r_object_id in(select r_component_id from dmi_package where r_workflow_id in(select r_object_id from dm_workflow where     r_runtime_state=1))

 

   11.查询一个文档的系统路径

      select doc.r_object_id,doc.object_name,mfile_url('',-1,'') as mypath,doc.i_folder_id from dm_document doc

12.查询文档的用户签名  

select audited_obj_id from dm_audittrail where event_name='dm_signoff' and user_name='tom'

13.测试NULL和默认值 NULLDATENULLSTRINGNULLINTNULLID,注册表用NULL

  select * from dm_user where user_address is nullstring

14.返回指定组的用户成员

  select user_name from dm_user where user_group_name='admingroup'

15.查询属于一个虚拟文档的所有components

  Select * from dm_sysobject IN DOCUMENT ID(‘object_id’) DESCEND

16. 查询一个文件下面文件夹和文档的总数量

         select count(r_object_id) from dm_sysobject where (type(dm_document) and ...) or (type(dm_folder)) and folder(ID('...'), descend)

17.查询扩展名对应dctm的类型

 select name,dos_extension from dm_format

18.获取流程中的包或附件

 select r_component_name from dmi_package where r_workflow_id=’’

select * from dmi_wf_attachment where r_workflow_id=

 

19.判断时间字段是否为空

 select * from ps_pst_borrow where retime IS NULLDATE OR  retime IS NULL

20.dql分页或获取中间n条记录

 select r_object_id,object_name from dm_document ENABLE(RETURN_RANGE " + startRow + " " + endRow + " 'r_creation_date desc')

 21. ENABLE(ROW_BASED)用法



 

22.创建dm_filestore对象  必须先创建dm_location对象
 1. CREATE a dm_location object. i.e. AS follow:

 

CREATE dm_location OBJECT SET object_name = 'storage_02' SET path_type = 

'directory' SET file_system_path = 

'/newly/created/location/obsolute/path/to/data/content_storage_02'

 

2. CREATE a dm_filestore object. i.e. AS follow:

 

CREATE dm_filestore OBJECT SET name = 'filestore_02' SET is_public = F SET 

root = 'storage_02'

 

**root should have the value of newly created dm_location object, IN this 

example, storage_02.

 

3. CHANGE ALL dm_sysobject's, and custom types'--if applicable--default 

storage area TO the newly created filestore, USING DA OR DQL.

 

4. FLUSH cache, AND publish DATA dictionary. i.e.

CODE

API>flushcache,c

API>flush,persistentcache,c

API>flush,persistentobjcache,c

API>publish_dd,c

API>reinit,c

 

5. Clear dmcl cache ON the App server, AS well the content server AND 

re-start the two.

 

 

 


  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值