Skip to content

Commit

Permalink
ndb: add since and until
Browse files Browse the repository at this point in the history
  • Loading branch information
jb55 committed Dec 30, 2024
1 parent dba3aca commit eb75200
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion ndb.c
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,17 @@ int main(int argc, char *argv[])
ndb_filter_end_field(f);
argv += 2;
argc -= 2;
} else if (!strcmp(argv[0], "-u")) {
} else if (!strcmp(argv[0], "--since") || !strcmp(argv[0], "-s")) {
if (current_field) {
ndb_filter_end_field(f);
current_field = 0;
}
ndb_filter_start_field(f, NDB_FILTER_SINCE);
ndb_filter_add_int_element(f, atoll(argv[1]));
ndb_filter_end_field(f);
argv += 2;
argc -= 2;
} else if (!strcmp(argv[0], "--until") || !strcmp(argv[0], "-u")) {
if (current_field) {
ndb_filter_end_field(f);
current_field = 0;
Expand Down

0 comments on commit eb75200

Please sign in to comment.