如何使用SQL在Alfresco中获取文档名称?

编程入门 行业动态 更新时间:2024-10-11 11:23:29
本文介绍了如何使用SQL在Alfresco中获取文档名称?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

如何从Alfresco数据库(PostgreSQL)中检索文档的名称?我正在尝试获取给定用户创建的文档列表,例如管理员,从开始日期开始,例如2015-05-03:

How to retrieve the name of a document from the Alfresco database (PostgreSQL)? I'm trying to get a list of documents created by a given user, e.g. admin, from a starting date, e.g. 2015-05-03:

SELECT child.child_node_name, node.audit_created FROM alf_child_assoc child, alf_node node, alf_node_properties prop, alf_qname qname WHERE child.child_node_id = node.id AND node.id = prop.node_id AND prop.qname_id = qname.id AND qname.local_name = 'content' AND node.audit_creator = 'admin' AND node.audit_created > '2015-05-03' ORDER BY node.audit_created

如何获取实际值文件,而不是所有内容项? 因为现在它还显示完整的节点引用,所以我只想要文档的可读名称。有什么建议吗?

How do I get actual documents and not all content items? Because now it also displays full node references and I just want the human readable name of a document. Any suggestions?

顺便说一句,我在后端(存储库)上工作,而不是在共享上工作。我正在使用Alfresco 5.0.1。

By the way, I'm working on the back-end (Repository), not on Share. And I'm using Alfresco 5.0.1.

推荐答案

基于其他查询,我创建了以下查询:

Based on the other anwsers I created this query:

SELECT string_value AS document_name, audit_created AS creation_date FROM alf_node node INNER JOIN alf_node_properties ON (id=node_id) INNER JOIN alf_qname ON (qname_id=alf_qname.id) WHERE ns_id IN (SELECT ns.id FROM alf_namespace AS ns WHERE ns.uri='www.alfresco/model/content/1.0') AND local_name='name' AND audit_creator = 'admin' AND audit_created > '2015-05-06' ORDER BY audit_created;

这样,您不必知道qname_id。

This way you don't have to know the qname_id.

谢谢Sam,Gagravarr和streetturtle。

Thank you Sam, Gagravarr and streetturtle.

更多推荐

如何使用SQL在Alfresco中获取文档名称?

本文发布于:2023-11-28 12:18:59,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1642369.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:如何使用   名称   文档   Alfresco   SQL

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!