]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
mdssvc: add support for parsing date ranges
authorRalph Boehme <slow@samba.org>
Wed, 15 Oct 2025 13:01:16 +0000 (15:01 +0200)
committerJule Anger <janger@samba.org>
Mon, 3 Nov 2025 14:56:14 +0000 (14:56 +0000)
Example:

  InRange(kMDItemContentCreationDate,$time.iso(2024-12-31T23:00:00Z),$time.iso(2025-12-31T23:00:00Z))

BUG: https://bugzilla.samba.org/show_bug.cgi?id=15930

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Autobuild-User(master): Ralph Böhme <slow@samba.org>
Autobuild-Date(master): Mon Oct 20 10:59:03 UTC 2025 on atb-devel-224

(cherry picked from commit c00de32585bf47ec4753f966fe9ac4dd2fb8f4e7)

Autobuild-User(v4-23-test): Jule Anger <janger@samba.org>
Autobuild-Date(v4-23-test): Mon Nov  3 14:56:14 UTC 2025 on atb-devel-224

selftest/knownfail.d/samba.unittests.mdsparser_es [deleted file]
source3/rpc_server/mdssvc/es_parser.y

diff --git a/selftest/knownfail.d/samba.unittests.mdsparser_es b/selftest/knownfail.d/samba.unittests.mdsparser_es
deleted file mode 100644 (file)
index b5d7bc8..0000000
+++ /dev/null
@@ -1 +0,0 @@
-^samba.unittests.mdsparser_es.*test_mdsparser_es\(none\)
index cea2ce8eb0c6ab1e3055c532941621112da86697..1f1c02ba1a5bf2430e2929969a3f77c50035ca5e 100644 (file)
@@ -219,6 +219,13 @@ FUNC_INRANGE OBRACE attribute COMMA WORD COMMA WORD CBRACE {
        } else {
                $$ = map_expr($3, '~', $5, $7);
        }
+}
+| FUNC_INRANGE OBRACE attribute COMMA isodate COMMA isodate CBRACE {
+       if ($3 == NULL) {
+               $$ = NULL;
+       } else {
+               $$ = map_expr($3, '~', $5, $7);
+       }
 };
 
 attribute: