@naturalcycles/db-lib 8.38.1 → 8.39.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -4,6 +4,7 @@ exports.queryInMemory = void 0;
4
4
  const js_lib_1 = require("@naturalcycles/js-lib");
5
5
  const FILTER_FNS = {
6
6
  '==': (v, val) => v === val,
7
+ '!=': (v, val) => v !== val,
7
8
  '<': (v, val) => v < val,
8
9
  '<=': (v, val) => v <= val,
9
10
  '>': (v, val) => v > val,
@@ -22,8 +22,8 @@ import { RunQueryResult } from '../db.model';
22
22
  *
23
23
  * You may also look at queryInMemory() for its implementation (it implements all those).
24
24
  */
25
- export declare type DBQueryFilterOperator = '<' | '<=' | '==' | '>=' | '>' | 'in' | 'not-in' | 'array-contains' | 'array-contains-any';
26
- export declare const dbQueryFilterOperatorValues: string[];
25
+ export declare type DBQueryFilterOperator = '<' | '<=' | '==' | '!=' | '>=' | '>' | 'in' | 'not-in' | 'array-contains' | 'array-contains-any';
26
+ export declare const dbQueryFilterOperatorValues: DBQueryFilterOperator[];
27
27
  export interface DBQueryFilter<ROW extends ObjectWithId = AnyObjectWithId> {
28
28
  name: keyof ROW;
29
29
  op: DBQueryFilterOperator;
@@ -6,6 +6,7 @@ exports.dbQueryFilterOperatorValues = [
6
6
  '<',
7
7
  '<=',
8
8
  '==',
9
+ '!=',
9
10
  '>=',
10
11
  '>',
11
12
  'in',
package/package.json CHANGED
@@ -12,7 +12,7 @@
12
12
  "@naturalcycles/bench-lib": "^1.0.0",
13
13
  "@naturalcycles/dev-lib": "^12.0.1",
14
14
  "@types/node": "^17.0.0",
15
- "jest": "^27.0.3",
15
+ "jest": "^28.0.3",
16
16
  "weak-napi": "^2.0.2"
17
17
  },
18
18
  "files": [
@@ -42,7 +42,7 @@
42
42
  "engines": {
43
43
  "node": ">=14.15"
44
44
  },
45
- "version": "8.38.1",
45
+ "version": "8.39.0",
46
46
  "description": "Lowest Common Denominator API to supported Databases",
47
47
  "keywords": [
48
48
  "db",
@@ -4,6 +4,7 @@ import { DBQuery, DBQueryFilterOperator } from '../../query/dbQuery'
4
4
  type FilterFn = (v: any, val: any) => boolean
5
5
  const FILTER_FNS: Record<DBQueryFilterOperator, FilterFn> = {
6
6
  '==': (v, val) => v === val,
7
+ '!=': (v, val) => v !== val,
7
8
  '<': (v, val) => v < val,
8
9
  '<=': (v, val) => v <= val,
9
10
  '>': (v, val) => v > val,
@@ -27,6 +27,7 @@ export type DBQueryFilterOperator =
27
27
  | '<'
28
28
  | '<='
29
29
  | '=='
30
+ | '!='
30
31
  | '>='
31
32
  | '>'
32
33
  | 'in'
@@ -34,10 +35,11 @@ export type DBQueryFilterOperator =
34
35
  | 'array-contains'
35
36
  | 'array-contains-any'
36
37
 
37
- export const dbQueryFilterOperatorValues = [
38
+ export const dbQueryFilterOperatorValues: DBQueryFilterOperator[] = [
38
39
  '<',
39
40
  '<=',
40
41
  '==',
42
+ '!=',
41
43
  '>=',
42
44
  '>',
43
45
  'in',