diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 02:57:58 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 02:57:58 +0000 |
commit | be1c7e50e1e8809ea56f2c9d472eccd8ffd73a97 (patch) | |
tree | 9754ff1ca740f6346cf8483ec915d4054bc5da2d /web/server/h2o/libh2o/misc/oktavia/src/query.jsx | |
parent | Initial commit. (diff) | |
download | netdata-be1c7e50e1e8809ea56f2c9d472eccd8ffd73a97.tar.xz netdata-be1c7e50e1e8809ea56f2c9d472eccd8ffd73a97.zip |
Adding upstream version 1.44.3.upstream/1.44.3upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r-- | web/server/h2o/libh2o/misc/oktavia/src/query.jsx | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/web/server/h2o/libh2o/misc/oktavia/src/query.jsx b/web/server/h2o/libh2o/misc/oktavia/src/query.jsx new file mode 100644 index 00000000..38c52c71 --- /dev/null +++ b/web/server/h2o/libh2o/misc/oktavia/src/query.jsx @@ -0,0 +1,37 @@ +class Query +{ + var word : string; + var or : boolean; + var not : boolean; + var raw : boolean; + + function constructor () + { + this.word = ''; + this.or = false; + this.not = false; + this.raw = false; + } + + override function toString () : string + { + var result = [] : string[]; + if (this.or) + { + result.push("OR "); + } + if (this.not) + { + result.push("-"); + } + if (this.raw) + { + result.push('"', this.word, '"'); + } + else + { + result.push(this.word); + } + return result.join(''); + } +} |