Daisy documentation
 PreviousHomeNext 
4.6.2 Query LanguageBook Index4.7 Full Text Indexer

4.6.3 Example queries

4.6.3.1 List of all documents

select id, name where true

4.6.3.2 Search on document name

select id, name where name like 'p%' order by creationTime desc limit 10

4.6.3.3 Show the 10 largest documents

select id, name, totalSizeOfParts where true order by totalSizeOfParts desc limit 10

4.6.3.4 Show documents of which the last version has not yet been published

select id, name, versionState, versionCreationTime
  where versionState = 'draft' option search_last_version = 'true'

4.6.3.5 Overview of all locks

select id, name, lockType, lockOwnerName, lockTimeAcquired, lockDuration
  where lockType is not null

4.6.3.6 All documents having a part containing an image

select id, name where HasPartWithMimeType('image/%')

4.6.3.7 Order documents randomly

select name where true order by Random()

4.6.3.8 Documents ordered by length of their name

select name, Length(name) where true order by Length(name) DESC
 PreviousHomeNext 
4.6.2 Query Language4.7 Full Text Indexer