facebook/watchman

why watchman does not support query base on time frame and sorting ability?

liuyangjason opened this issue · 0 comments

I want to query the files with modification timestamp between a time frame, it fails to work. what I did is as follow:

watchman -j <<-EOT
["query", "/campphoto-test/nvr1", {
    "expression":  ["allof", ["type", "f"], ["suffix", "jpg"], ["since", 1681544400], ["suffix", "jpg"], ["since", 600]],
    "fields": ["name", "path"]
}]
EOT

I want to sort the result to get the earliest file. it also fall short in accommodating it.

watchman -j <<-EOT
[
  "query",
  "/campphoto-test/nvr1",
  {
    "expression": ["allof", ["type", "f"], ["suffix", "jpeg"]],
    "fields": ["name", "mtime_ms"],
    "sort": [{"key": "mtime_ms", "order": "asc"}],
    "limit": 1
  }
]
EOT

I am using version 4.9 on centos7.

why facebook watchman does not support this kind of features?