summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoranonymous2022-09-21 12:46:08 -0400
committeranonymous2022-09-21 12:46:08 -0400
commit16cbe07449420b94d6121de96f27c02ca5d1bec8 (patch)
tree3482b32db44291df5c4fe7040d9ff082c395a142
parent2348e4796eef07418177508204aad5476da01e30 (diff)
added query for logoot
-rw-r--r--logoot.js38
1 files changed, 26 insertions, 12 deletions
diff --git a/logoot.js b/logoot.js
index f183cbe..bcd5f6d 100644
--- a/logoot.js
+++ b/logoot.js
@@ -1,21 +1,24 @@
export default {
- maxInt: 9007199254740992,
-
- begin() {
- return []
+ query(property) {
+ return {
+ [property]: {
+ $type: 'array',
+ $type: ['int', 'long'],
+ },
+ $nor: [
+ { [property]: { $gt: this.maxInt } },
+ { [property]: { $lt: 0 } },
+ ]
+ }
},
- end() {
- return [this.maxInt]
+ get before() {
+ return []
},
- lengthWithoutZeros(a) {
- let length = a.length
- while (length > 0 && a[length - 1] == 0) {
- length--
- }
- return length
+ get after() {
+ return [this.maxInt+1]
},
between(a, b) {
@@ -131,4 +134,15 @@ export default {
return 0
}
},
+
+
+ lengthWithoutZeros(a) {
+ let length = a.length
+ while (length > 0 && a[length - 1] == 0) {
+ length--
+ }
+ return length
+ },
+
+ maxInt: 9007199254740991,
}