You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@chemistry.apache.org by "krzysztoffzielinski@gmail.com" <kr...@gmail.com> on 2017/12/14 16:26:08 UTC
Query latest document
Hello All
Is there a way to query the latest document using CMIS queries?
e.g. max(modified) ?? or to specify WHERE clause saying latest date???
Thanks
Krzysztof
Re: Query latest document
Posted by Florian Müller <fm...@apache.org>.
Sure there is. Use paging.
Set the page size to one and fetch the first page.
- Florian
> Thanks a lot.
>
> So there is no way to limit to only one result returned?
>
> On 2017-12-15 04:12, Antony Joseph Kitherian Xavier <an...@entosstech.com> wrote:
>> You may also use the following if you want to fetch latest documents by
>> specific date;
>>
>> SELECT * FROM cmis:document WHERE cmis:lastModificationDate > TIMESTAMP
>> '2017-11-20T12:00:00.000Z'
>>
>> On Fri, Dec 15, 2017 at 1:49 AM, Florian Müller <fm...@apache.org> wrote:
>>
>>> Are you looking for this:
>>>
>>> SELECT cmis:objectId,cmis:lastModificationDate FROM cmis:document ORDER
>>> BY cmis:lastModificationDate DESC
>>>
>>> - Florian
>>>
>>>
>>>
>>> Hello All
>>>>
>>>> Is there a way to query the latest document using CMIS queries?
>>>> e.g. max(modified) ?? or to specify WHERE clause saying latest date???
>>>>
>>>> Thanks
>>>> Krzysztof
>>>>
>>>
>>
>>
>> --
>> Antony Joseph Kitherian .X
>> Founder & CEO
>> Entoss Technologies Pte Ltd, Singapore
>> www.entosstech.com
>>
Re: Query latest document
Posted by "krzysztoffzielinski@gmail.com" <kr...@gmail.com>.
Thanks a lot.
So there is no way to limit to only one result returned?
On 2017-12-15 04:12, Antony Joseph Kitherian Xavier <an...@entosstech.com> wrote:
> You may also use the following if you want to fetch latest documents by
> specific date;
>
> SELECT * FROM cmis:document WHERE cmis:lastModificationDate > TIMESTAMP
> '2017-11-20T12:00:00.000Z'
>
> On Fri, Dec 15, 2017 at 1:49 AM, Florian Müller <fm...@apache.org> wrote:
>
> > Are you looking for this:
> >
> > SELECT cmis:objectId,cmis:lastModificationDate FROM cmis:document ORDER
> > BY cmis:lastModificationDate DESC
> >
> > - Florian
> >
> >
> >
> > Hello All
> >>
> >> Is there a way to query the latest document using CMIS queries?
> >> e.g. max(modified) ?? or to specify WHERE clause saying latest date???
> >>
> >> Thanks
> >> Krzysztof
> >>
> >
>
>
> --
> Antony Joseph Kitherian .X
> Founder & CEO
> Entoss Technologies Pte Ltd, Singapore
> www.entosstech.com
>
Re: Query latest document
Posted by Antony Joseph Kitherian Xavier <an...@entosstech.com>.
You may also use the following if you want to fetch latest documents by
specific date;
SELECT * FROM cmis:document WHERE cmis:lastModificationDate > TIMESTAMP
'2017-11-20T12:00:00.000Z'
On Fri, Dec 15, 2017 at 1:49 AM, Florian Müller <fm...@apache.org> wrote:
> Are you looking for this:
>
> SELECT cmis:objectId,cmis:lastModificationDate FROM cmis:document ORDER
> BY cmis:lastModificationDate DESC
>
> - Florian
>
>
>
> Hello All
>>
>> Is there a way to query the latest document using CMIS queries?
>> e.g. max(modified) ?? or to specify WHERE clause saying latest date???
>>
>> Thanks
>> Krzysztof
>>
>
--
Antony Joseph Kitherian .X
Founder & CEO
Entoss Technologies Pte Ltd, Singapore
www.entosstech.com
Re: Query latest document
Posted by Florian Müller <fm...@apache.org>.
Are you looking for this:
SELECT cmis:objectId,cmis:lastModificationDate FROM cmis:document ORDER
BY cmis:lastModificationDate DESC
- Florian
> Hello All
>
> Is there a way to query the latest document using CMIS queries?
> e.g. max(modified) ?? or to specify WHERE clause saying latest date???
>
> Thanks
> Krzysztof