facebook / facebook/watchman

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

Open
#1,134 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
13.7k
Forks
1.1k
PR merge metrics
No merged PRs in 30d

Description

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?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.