Hi,
I wanted to know if it's possible to give a regex while deleting a resource.
I have documents stored in a hierarchy of collections like
{year}{month}/doc.xml.
Eg: 202301/abc.xml, 202302/def.xml.
If I want to delete a resource "abc.xml", Is it possible to issue commands
like "*db:delete("db-name", '/*/abc.xml')*" ? Right now, I can do a XQuery
with db:list and endsWith and get the complete path of "abc.xml". But regex
would have been very handy.
Similarly I also want to execute queries against a list of collections
using regex.
Something like "*for $document in collection('db-name/20230*')*" (First 9
months of 2023)
Right now, I am doing something like
"for $i in ('01', '02', '03', '04', ... '09')
for $document in collection('test-collection/2023' || $i)"
But if there are better ways, kindly let me know.
Thank you,
Deepak