Press n or j to go to the next uncovered block, b, p or k for the previous block.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 | 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x | "use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.Condition = void 0;
// Package: com.lightningkite.lightningdb
// Generated by Khrysalis - this file will be overwritten.
const DataClassProperty_1 = require("./DataClassProperty");
const khrysalis_runtime_1 = require("@lightningkite/khrysalis-runtime");
//! Declares com.lightningkite.lightningdb.Condition
class Condition {
constructor() {
}
hashCode() { throw undefined; }
equals(other) { throw undefined; }
invoke(on) { throw undefined; }
and(other) {
return new Condition.And([this, other]);
}
or(other) {
return new Condition.Or([this, other]);
}
not() {
return new Condition.Not(this);
}
}
exports.Condition = Condition;
(function (Condition) {
//! Declares com.lightningkite.lightningdb.Condition.Never
class Never extends Condition {
constructor() {
super();
}
invoke(on) {
return false;
}
hashCode() {
return 0;
}
equals(other) {
return ((0, khrysalis_runtime_1.tryCastClass)(other, Condition.Never)) !== null;
}
}
Condition.Never = Never;
})(Condition = exports.Condition || (exports.Condition = {}));
(function (Condition) {
//! Declares com.lightningkite.lightningdb.Condition.Always
class Always extends Condition {
constructor() {
super();
}
invoke(on) {
return true;
}
hashCode() {
return 1;
}
equals(other) {
return ((0, khrysalis_runtime_1.tryCastClass)(other, Condition.Always)) !== null;
}
}
Condition.Always = Always;
})(Condition = exports.Condition || (exports.Condition = {}));
(function (Condition) {
//! Declares com.lightningkite.lightningdb.Condition.And
class And extends Condition {
constructor(conditions) {
super();
this.conditions = conditions;
}
static propertyTypes(T) { return { conditions: [Array, [Condition, T]] }; }
invoke(on) {
return this.conditions.every((it) => it.invoke(on));
}
}
And.properties = ["conditions"];
Condition.And = And;
(0, khrysalis_runtime_1.setUpDataClass)(And);
})(Condition = exports.Condition || (exports.Condition = {}));
(function (Condition) {
//! Declares com.lightningkite.lightningdb.Condition.Or
class Or extends Condition {
constructor(conditions) {
super();
this.conditions = conditions;
}
static propertyTypes(T) { return { conditions: [Array, [Condition, T]] }; }
invoke(on) {
return this.conditions.some((it) => it.invoke(on));
}
}
Or.properties = ["conditions"];
Condition.Or = Or;
(0, khrysalis_runtime_1.setUpDataClass)(Or);
})(Condition = exports.Condition || (exports.Condition = {}));
(function (Condition) {
//! Declares com.lightningkite.lightningdb.Condition.Not
class Not extends Condition {
constructor(condition) {
super();
this.condition = condition;
}
static propertyTypes(T) { return { condition: [Condition, T] }; }
invoke(on) {
return (!this.condition.invoke(on));
}
}
Not.properties = ["condition"];
Condition.Not = Not;
(0, khrysalis_runtime_1.setUpDataClass)(Not);
})(Condition = exports.Condition || (exports.Condition = {}));
(function (Condition) {
//! Declares com.lightningkite.lightningdb.Condition.Equal
class Equal extends Condition {
constructor(value) {
super();
this.value = value;
}
static propertyTypes(T) { return { value: T }; }
invoke(on) {
return (0, khrysalis_runtime_1.safeEq)(on, this.value);
}
}
Equal.properties = ["value"];
Condition.Equal = Equal;
(0, khrysalis_runtime_1.setUpDataClass)(Equal);
})(Condition = exports.Condition || (exports.Condition = {}));
(function (Condition) {
//! Declares com.lightningkite.lightningdb.Condition.NotEqual
class NotEqual extends Condition {
constructor(value) {
super();
this.value = value;
}
static propertyTypes(T) { return { value: T }; }
invoke(on) {
return !(0, khrysalis_runtime_1.safeEq)(on, this.value);
}
}
NotEqual.properties = ["value"];
Condition.NotEqual = NotEqual;
(0, khrysalis_runtime_1.setUpDataClass)(NotEqual);
})(Condition = exports.Condition || (exports.Condition = {}));
(function (Condition) {
//! Declares com.lightningkite.lightningdb.Condition.Inside
class Inside extends Condition {
constructor(values) {
super();
this.values = values;
}
static propertyTypes(T) { return { values: [Array, T] }; }
invoke(on) {
return this.values.some((x) => (0, khrysalis_runtime_1.safeEq)(on, x));
}
}
Inside.properties = ["values"];
Condition.Inside = Inside;
(0, khrysalis_runtime_1.setUpDataClass)(Inside);
})(Condition = exports.Condition || (exports.Condition = {}));
(function (Condition) {
//! Declares com.lightningkite.lightningdb.Condition.NotInside
class NotInside extends Condition {
constructor(values) {
super();
this.values = values;
}
static propertyTypes(T) { return { values: [Array, T] }; }
invoke(on) {
return (!this.values.some((x) => (0, khrysalis_runtime_1.safeEq)(on, x)));
}
}
NotInside.properties = ["values"];
Condition.NotInside = NotInside;
(0, khrysalis_runtime_1.setUpDataClass)(NotInside);
})(Condition = exports.Condition || (exports.Condition = {}));
(function (Condition) {
//! Declares com.lightningkite.lightningdb.Condition.GreaterThan
class GreaterThan extends Condition {
constructor(value) {
super();
this.value = value;
}
static propertyTypes(T) { return { value: T }; }
invoke(on) {
return (0, khrysalis_runtime_1.safeCompare)(on, this.value) > 0;
}
}
GreaterThan.properties = ["value"];
Condition.GreaterThan = GreaterThan;
(0, khrysalis_runtime_1.setUpDataClass)(GreaterThan);
})(Condition = exports.Condition || (exports.Condition = {}));
(function (Condition) {
//! Declares com.lightningkite.lightningdb.Condition.LessThan
class LessThan extends Condition {
constructor(value) {
super();
this.value = value;
}
static propertyTypes(T) { return { value: T }; }
invoke(on) {
return (0, khrysalis_runtime_1.safeCompare)(on, this.value) < 0;
}
}
LessThan.properties = ["value"];
Condition.LessThan = LessThan;
(0, khrysalis_runtime_1.setUpDataClass)(LessThan);
})(Condition = exports.Condition || (exports.Condition = {}));
(function (Condition) {
//! Declares com.lightningkite.lightningdb.Condition.GreaterThanOrEqual
class GreaterThanOrEqual extends Condition {
constructor(value) {
super();
this.value = value;
}
static propertyTypes(T) { return { value: T }; }
invoke(on) {
return (0, khrysalis_runtime_1.safeCompare)(on, this.value) >= 0;
}
}
GreaterThanOrEqual.properties = ["value"];
Condition.GreaterThanOrEqual = GreaterThanOrEqual;
(0, khrysalis_runtime_1.setUpDataClass)(GreaterThanOrEqual);
})(Condition = exports.Condition || (exports.Condition = {}));
(function (Condition) {
//! Declares com.lightningkite.lightningdb.Condition.LessThanOrEqual
class LessThanOrEqual extends Condition {
constructor(value) {
super();
this.value = value;
}
static propertyTypes(T) { return { value: T }; }
invoke(on) {
return (0, khrysalis_runtime_1.safeCompare)(on, this.value) <= 0;
}
}
LessThanOrEqual.properties = ["value"];
Condition.LessThanOrEqual = LessThanOrEqual;
(0, khrysalis_runtime_1.setUpDataClass)(LessThanOrEqual);
})(Condition = exports.Condition || (exports.Condition = {}));
(function (Condition) {
//! Declares com.lightningkite.lightningdb.Condition.Search
class Search extends Condition {
constructor(value, ignoreCase) {
super();
this.value = value;
this.ignoreCase = ignoreCase;
}
static propertyTypes() { return { value: [String], ignoreCase: [Boolean] }; }
invoke(on) {
return (on.toLowerCase().indexOf(this.value.toLowerCase()) != -1);
}
}
Search.properties = ["value", "ignoreCase"];
Condition.Search = Search;
(0, khrysalis_runtime_1.setUpDataClass)(Search);
})(Condition = exports.Condition || (exports.Condition = {}));
(function (Condition) {
//! Declares com.lightningkite.lightningdb.Condition.IntBitsClear
class IntBitsClear extends Condition {
constructor(mask) {
super();
this.mask = mask;
}
static propertyTypes() { return { mask: [Number] }; }
invoke(on) {
return (on & this.mask) === 0;
}
}
IntBitsClear.properties = ["mask"];
Condition.IntBitsClear = IntBitsClear;
(0, khrysalis_runtime_1.setUpDataClass)(IntBitsClear);
})(Condition = exports.Condition || (exports.Condition = {}));
(function (Condition) {
//! Declares com.lightningkite.lightningdb.Condition.IntBitsSet
class IntBitsSet extends Condition {
constructor(mask) {
super();
this.mask = mask;
}
static propertyTypes() { return { mask: [Number] }; }
invoke(on) {
return (on & this.mask) === this.mask;
}
}
IntBitsSet.properties = ["mask"];
Condition.IntBitsSet = IntBitsSet;
(0, khrysalis_runtime_1.setUpDataClass)(IntBitsSet);
})(Condition = exports.Condition || (exports.Condition = {}));
(function (Condition) {
//! Declares com.lightningkite.lightningdb.Condition.IntBitsAnyClear
class IntBitsAnyClear extends Condition {
constructor(mask) {
super();
this.mask = mask;
}
static propertyTypes() { return { mask: [Number] }; }
invoke(on) {
return (on & this.mask) < this.mask;
}
}
IntBitsAnyClear.properties = ["mask"];
Condition.IntBitsAnyClear = IntBitsAnyClear;
(0, khrysalis_runtime_1.setUpDataClass)(IntBitsAnyClear);
})(Condition = exports.Condition || (exports.Condition = {}));
(function (Condition) {
//! Declares com.lightningkite.lightningdb.Condition.IntBitsAnySet
class IntBitsAnySet extends Condition {
constructor(mask) {
super();
this.mask = mask;
}
static propertyTypes() { return { mask: [Number] }; }
invoke(on) {
return (on & this.mask) > 0;
}
}
IntBitsAnySet.properties = ["mask"];
Condition.IntBitsAnySet = IntBitsAnySet;
(0, khrysalis_runtime_1.setUpDataClass)(IntBitsAnySet);
})(Condition = exports.Condition || (exports.Condition = {}));
(function (Condition) {
//! Declares com.lightningkite.lightningdb.Condition.AllElements
class AllElements extends Condition {
constructor(condition) {
super();
this.condition = condition;
}
static propertyTypes(E) { return { condition: [Condition, E] }; }
invoke(on) {
return on.every((it) => this.condition.invoke(it));
}
}
AllElements.properties = ["condition"];
Condition.AllElements = AllElements;
(0, khrysalis_runtime_1.setUpDataClass)(AllElements);
})(Condition = exports.Condition || (exports.Condition = {}));
(function (Condition) {
//! Declares com.lightningkite.lightningdb.Condition.AnyElements
class AnyElements extends Condition {
constructor(condition) {
super();
this.condition = condition;
}
static propertyTypes(E) { return { condition: [Condition, E] }; }
invoke(on) {
return on.some((it) => this.condition.invoke(it));
}
}
AnyElements.properties = ["condition"];
Condition.AnyElements = AnyElements;
(0, khrysalis_runtime_1.setUpDataClass)(AnyElements);
})(Condition = exports.Condition || (exports.Condition = {}));
(function (Condition) {
//! Declares com.lightningkite.lightningdb.Condition.SizesEquals
class SizesEquals extends Condition {
constructor(count) {
super();
this.count = count;
}
static propertyTypes(E) { return { count: [Number] }; }
invoke(on) {
return on.length === this.count;
}
}
SizesEquals.properties = ["count"];
Condition.SizesEquals = SizesEquals;
(0, khrysalis_runtime_1.setUpDataClass)(SizesEquals);
})(Condition = exports.Condition || (exports.Condition = {}));
(function (Condition) {
//! Declares com.lightningkite.lightningdb.Condition.Exists
class Exists extends Condition {
constructor(key) {
super();
this.key = key;
}
static propertyTypes(V) { return { key: [String] }; }
invoke(on) {
return on.has(this.key);
}
}
Exists.properties = ["key"];
Condition.Exists = Exists;
(0, khrysalis_runtime_1.setUpDataClass)(Exists);
})(Condition = exports.Condition || (exports.Condition = {}));
(function (Condition) {
//! Declares com.lightningkite.lightningdb.Condition.OnKey
class OnKey extends Condition {
constructor(key, condition) {
super();
this.key = key;
this.condition = condition;
}
static propertyTypes(V) { return { key: [String], condition: [Condition, V] }; }
invoke(on) {
var _a;
return on.has(this.key) && this.condition.invoke(((_a = on.get(this.key)) !== null && _a !== void 0 ? _a : null));
}
}
OnKey.properties = ["key", "condition"];
Condition.OnKey = OnKey;
(0, khrysalis_runtime_1.setUpDataClass)(OnKey);
})(Condition = exports.Condition || (exports.Condition = {}));
(function (Condition) {
//! Declares com.lightningkite.lightningdb.Condition.OnField
class OnField extends Condition {
constructor(key, condition) {
super();
this.key = key;
this.condition = condition;
}
static propertyTypes(K, V) { return { key: [DataClassProperty_1.DataClassProperty, K, V], condition: [Condition, V] }; }
invoke(on) {
return this.condition.invoke(this.key.get(on));
}
}
OnField.properties = ["key", "condition"];
Condition.OnField = OnField;
(0, khrysalis_runtime_1.setUpDataClass)(OnField);
})(Condition = exports.Condition || (exports.Condition = {}));
(function (Condition) {
//! Declares com.lightningkite.lightningdb.Condition.IfNotNull
class IfNotNull extends Condition {
constructor(condition) {
super();
this.condition = condition;
}
static propertyTypes(T) { return { condition: [Condition, T] }; }
invoke(on) {
return on !== null && this.condition.invoke(on);
}
}
IfNotNull.properties = ["condition"];
Condition.IfNotNull = IfNotNull;
(0, khrysalis_runtime_1.setUpDataClass)(IfNotNull);
})(Condition = exports.Condition || (exports.Condition = {}));
//# sourceMappingURL=Condition.js.map |