flowquery 1.0.35 → 1.0.36
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.
- package/dist/flowquery.min.js +1 -1
- package/dist/parsing/data_structures/lookup.d.ts.map +1 -1
- package/dist/parsing/data_structures/lookup.js +5 -1
- package/dist/parsing/data_structures/lookup.js.map +1 -1
- package/dist/parsing/functions/coalesce.d.ts +17 -0
- package/dist/parsing/functions/coalesce.d.ts.map +1 -0
- package/dist/parsing/functions/coalesce.js +61 -0
- package/dist/parsing/functions/coalesce.js.map +1 -0
- package/dist/parsing/functions/date.d.ts +22 -0
- package/dist/parsing/functions/date.d.ts.map +1 -0
- package/dist/parsing/functions/date.js +71 -0
- package/dist/parsing/functions/date.js.map +1 -0
- package/dist/parsing/functions/datetime.d.ts +22 -0
- package/dist/parsing/functions/datetime.d.ts.map +1 -0
- package/dist/parsing/functions/datetime.js +71 -0
- package/dist/parsing/functions/datetime.js.map +1 -0
- package/dist/parsing/functions/duration.d.ts +7 -0
- package/dist/parsing/functions/duration.d.ts.map +1 -0
- package/dist/parsing/functions/duration.js +145 -0
- package/dist/parsing/functions/duration.js.map +1 -0
- package/dist/parsing/functions/element_id.d.ts +7 -0
- package/dist/parsing/functions/element_id.d.ts.map +1 -0
- package/dist/parsing/functions/element_id.js +58 -0
- package/dist/parsing/functions/element_id.js.map +1 -0
- package/dist/parsing/functions/function_factory.d.ts +20 -0
- package/dist/parsing/functions/function_factory.d.ts.map +1 -1
- package/dist/parsing/functions/function_factory.js +20 -0
- package/dist/parsing/functions/function_factory.js.map +1 -1
- package/dist/parsing/functions/head.d.ts +7 -0
- package/dist/parsing/functions/head.d.ts.map +1 -0
- package/dist/parsing/functions/head.js +53 -0
- package/dist/parsing/functions/head.js.map +1 -0
- package/dist/parsing/functions/id.d.ts +7 -0
- package/dist/parsing/functions/id.d.ts.map +1 -0
- package/dist/parsing/functions/id.js +58 -0
- package/dist/parsing/functions/id.js.map +1 -0
- package/dist/parsing/functions/last.d.ts +7 -0
- package/dist/parsing/functions/last.d.ts.map +1 -0
- package/dist/parsing/functions/last.js +53 -0
- package/dist/parsing/functions/last.js.map +1 -0
- package/dist/parsing/functions/localdatetime.d.ts +21 -0
- package/dist/parsing/functions/localdatetime.d.ts.map +1 -0
- package/dist/parsing/functions/localdatetime.js +71 -0
- package/dist/parsing/functions/localdatetime.js.map +1 -0
- package/dist/parsing/functions/localtime.d.ts +20 -0
- package/dist/parsing/functions/localtime.d.ts.map +1 -0
- package/dist/parsing/functions/localtime.js +67 -0
- package/dist/parsing/functions/localtime.js.map +1 -0
- package/dist/parsing/functions/max.d.ts +14 -0
- package/dist/parsing/functions/max.d.ts.map +1 -0
- package/dist/parsing/functions/max.js +51 -0
- package/dist/parsing/functions/max.js.map +1 -0
- package/dist/parsing/functions/min.d.ts +14 -0
- package/dist/parsing/functions/min.d.ts.map +1 -0
- package/dist/parsing/functions/min.js +51 -0
- package/dist/parsing/functions/min.js.map +1 -0
- package/dist/parsing/functions/nodes.d.ts +7 -0
- package/dist/parsing/functions/nodes.d.ts.map +1 -0
- package/dist/parsing/functions/nodes.js +63 -0
- package/dist/parsing/functions/nodes.js.map +1 -0
- package/dist/parsing/functions/properties.d.ts +7 -0
- package/dist/parsing/functions/properties.d.ts.map +1 -0
- package/dist/parsing/functions/properties.js +74 -0
- package/dist/parsing/functions/properties.js.map +1 -0
- package/dist/parsing/functions/relationships.d.ts +7 -0
- package/dist/parsing/functions/relationships.d.ts.map +1 -0
- package/dist/parsing/functions/relationships.js +61 -0
- package/dist/parsing/functions/relationships.js.map +1 -0
- package/dist/parsing/functions/tail.d.ts +7 -0
- package/dist/parsing/functions/tail.d.ts.map +1 -0
- package/dist/parsing/functions/tail.js +50 -0
- package/dist/parsing/functions/tail.js.map +1 -0
- package/dist/parsing/functions/temporal_utils.d.ts +39 -0
- package/dist/parsing/functions/temporal_utils.d.ts.map +1 -0
- package/dist/parsing/functions/temporal_utils.js +168 -0
- package/dist/parsing/functions/temporal_utils.js.map +1 -0
- package/dist/parsing/functions/time.d.ts +20 -0
- package/dist/parsing/functions/time.d.ts.map +1 -0
- package/dist/parsing/functions/time.js +67 -0
- package/dist/parsing/functions/time.js.map +1 -0
- package/dist/parsing/functions/timestamp.d.ts +17 -0
- package/dist/parsing/functions/timestamp.d.ts.map +1 -0
- package/dist/parsing/functions/timestamp.js +51 -0
- package/dist/parsing/functions/timestamp.js.map +1 -0
- package/dist/parsing/functions/to_float.d.ts +7 -0
- package/dist/parsing/functions/to_float.d.ts.map +1 -0
- package/dist/parsing/functions/to_float.js +61 -0
- package/dist/parsing/functions/to_float.js.map +1 -0
- package/dist/parsing/functions/to_integer.d.ts +7 -0
- package/dist/parsing/functions/to_integer.d.ts.map +1 -0
- package/dist/parsing/functions/to_integer.js +61 -0
- package/dist/parsing/functions/to_integer.js.map +1 -0
- package/docs/flowquery.min.js +1 -1
- package/flowquery-py/pyproject.toml +1 -1
- package/flowquery-py/src/parsing/data_structures/lookup.py +2 -0
- package/flowquery-py/src/parsing/functions/__init__.py +40 -2
- package/flowquery-py/src/parsing/functions/coalesce.py +44 -0
- package/flowquery-py/src/parsing/functions/date_.py +63 -0
- package/flowquery-py/src/parsing/functions/datetime_.py +64 -0
- package/flowquery-py/src/parsing/functions/duration.py +159 -0
- package/flowquery-py/src/parsing/functions/element_id.py +50 -0
- package/flowquery-py/src/parsing/functions/head.py +39 -0
- package/flowquery-py/src/parsing/functions/id_.py +49 -0
- package/flowquery-py/src/parsing/functions/last.py +39 -0
- package/flowquery-py/src/parsing/functions/localdatetime.py +62 -0
- package/flowquery-py/src/parsing/functions/localtime.py +59 -0
- package/flowquery-py/src/parsing/functions/max_.py +49 -0
- package/flowquery-py/src/parsing/functions/min_.py +49 -0
- package/flowquery-py/src/parsing/functions/nodes.py +48 -0
- package/flowquery-py/src/parsing/functions/properties.py +50 -0
- package/flowquery-py/src/parsing/functions/relationships.py +46 -0
- package/flowquery-py/src/parsing/functions/tail.py +37 -0
- package/flowquery-py/src/parsing/functions/temporal_utils.py +186 -0
- package/flowquery-py/src/parsing/functions/time_.py +59 -0
- package/flowquery-py/src/parsing/functions/timestamp.py +39 -0
- package/flowquery-py/src/parsing/functions/to_float.py +46 -0
- package/flowquery-py/src/parsing/functions/to_integer.py +46 -0
- package/flowquery-py/tests/compute/test_runner.py +834 -1
- package/flowquery-vscode/flowQueryEngine/flowquery.min.js +1 -1
- package/package.json +1 -1
- package/src/parsing/data_structures/lookup.ts +8 -4
- package/src/parsing/functions/coalesce.ts +50 -0
- package/src/parsing/functions/date.ts +65 -0
- package/src/parsing/functions/datetime.ts +65 -0
- package/src/parsing/functions/duration.ts +143 -0
- package/src/parsing/functions/element_id.ts +51 -0
- package/src/parsing/functions/function_factory.ts +20 -0
- package/src/parsing/functions/head.ts +42 -0
- package/src/parsing/functions/id.ts +51 -0
- package/src/parsing/functions/last.ts +42 -0
- package/src/parsing/functions/localdatetime.ts +65 -0
- package/src/parsing/functions/localtime.ts +60 -0
- package/src/parsing/functions/max.ts +37 -0
- package/src/parsing/functions/min.ts +37 -0
- package/src/parsing/functions/nodes.ts +54 -0
- package/src/parsing/functions/properties.ts +56 -0
- package/src/parsing/functions/relationships.ts +52 -0
- package/src/parsing/functions/tail.ts +39 -0
- package/src/parsing/functions/temporal_utils.ts +180 -0
- package/src/parsing/functions/time.ts +60 -0
- package/src/parsing/functions/timestamp.ts +41 -0
- package/src/parsing/functions/to_float.ts +50 -0
- package/src/parsing/functions/to_integer.ts +50 -0
- package/tests/compute/runner.test.ts +726 -0
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
9
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
const function_1 = __importDefault(require("./function"));
|
|
13
|
+
const function_metadata_1 = require("./function_metadata");
|
|
14
|
+
/**
|
|
15
|
+
* Returns the number of milliseconds since the Unix epoch (1970-01-01T00:00:00Z).
|
|
16
|
+
*
|
|
17
|
+
* Equivalent to Neo4j's timestamp() function.
|
|
18
|
+
*
|
|
19
|
+
* @example
|
|
20
|
+
* ```
|
|
21
|
+
* RETURN timestamp() AS ts
|
|
22
|
+
* ```
|
|
23
|
+
*/
|
|
24
|
+
let Timestamp = class Timestamp extends function_1.default {
|
|
25
|
+
constructor() {
|
|
26
|
+
super("timestamp");
|
|
27
|
+
this._expectedParameterCount = 0;
|
|
28
|
+
}
|
|
29
|
+
value() {
|
|
30
|
+
return Date.now();
|
|
31
|
+
}
|
|
32
|
+
};
|
|
33
|
+
Timestamp = __decorate([
|
|
34
|
+
(0, function_metadata_1.FunctionDef)({
|
|
35
|
+
description: "Returns the number of milliseconds since the Unix epoch (1970-01-01T00:00:00Z). " +
|
|
36
|
+
"Equivalent to Neo4j's timestamp() function.",
|
|
37
|
+
category: "scalar",
|
|
38
|
+
parameters: [],
|
|
39
|
+
output: {
|
|
40
|
+
description: "Milliseconds since Unix epoch",
|
|
41
|
+
type: "number",
|
|
42
|
+
example: 1718450000000,
|
|
43
|
+
},
|
|
44
|
+
examples: [
|
|
45
|
+
"RETURN timestamp() AS ts",
|
|
46
|
+
"WITH timestamp() AS before, timestamp() AS after RETURN after - before",
|
|
47
|
+
],
|
|
48
|
+
})
|
|
49
|
+
], Timestamp);
|
|
50
|
+
exports.default = Timestamp;
|
|
51
|
+
//# sourceMappingURL=timestamp.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"timestamp.js","sourceRoot":"","sources":["../../../src/parsing/functions/timestamp.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,0DAAkC;AAClC,2DAAkD;AAElD;;;;;;;;;GASG;AAiBH,IAAM,SAAS,GAAf,MAAM,SAAU,SAAQ,kBAAQ;IAC5B;QACI,KAAK,CAAC,WAAW,CAAC,CAAC;QACnB,IAAI,CAAC,uBAAuB,GAAG,CAAC,CAAC;IACrC,CAAC;IAEM,KAAK;QACR,OAAO,IAAI,CAAC,GAAG,EAAE,CAAC;IACtB,CAAC;CACJ,CAAA;AATK,SAAS;IAhBd,IAAA,+BAAW,EAAC;QACT,WAAW,EACP,kFAAkF;YAClF,6CAA6C;QACjD,QAAQ,EAAE,QAAQ;QAClB,UAAU,EAAE,EAAE;QACd,MAAM,EAAE;YACJ,WAAW,EAAE,+BAA+B;YAC5C,IAAI,EAAE,QAAQ;YACd,OAAO,EAAE,aAAa;SACzB;QACD,QAAQ,EAAE;YACN,0BAA0B;YAC1B,wEAAwE;SAC3E;KACJ,CAAC;GACI,SAAS,CASd;AAED,kBAAe,SAAS,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"to_float.d.ts","sourceRoot":"","sources":["../../../src/parsing/functions/to_float.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,MAAM,YAAY,CAAC;AAGlC,cAiBM,OAAQ,SAAQ,QAAQ;;IAMnB,KAAK,IAAI,GAAG;CAqBtB;AAED,eAAe,OAAO,CAAC"}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
9
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
const function_1 = __importDefault(require("./function"));
|
|
13
|
+
const function_metadata_1 = require("./function_metadata");
|
|
14
|
+
let ToFloat = class ToFloat extends function_1.default {
|
|
15
|
+
constructor() {
|
|
16
|
+
super("tofloat");
|
|
17
|
+
this._expectedParameterCount = 1;
|
|
18
|
+
}
|
|
19
|
+
value() {
|
|
20
|
+
const val = this.getChildren()[0].value();
|
|
21
|
+
if (val === null || val === undefined) {
|
|
22
|
+
return null;
|
|
23
|
+
}
|
|
24
|
+
if (typeof val === "boolean") {
|
|
25
|
+
return val ? 1.0 : 0.0;
|
|
26
|
+
}
|
|
27
|
+
if (typeof val === "number") {
|
|
28
|
+
return val;
|
|
29
|
+
}
|
|
30
|
+
if (typeof val === "string") {
|
|
31
|
+
const trimmed = val.trim();
|
|
32
|
+
const parsed = Number(trimmed);
|
|
33
|
+
if (isNaN(parsed)) {
|
|
34
|
+
throw new Error(`Cannot convert string "${val}" to float`);
|
|
35
|
+
}
|
|
36
|
+
return parsed;
|
|
37
|
+
}
|
|
38
|
+
throw new Error("toFloat() expects a number, string, or boolean");
|
|
39
|
+
}
|
|
40
|
+
};
|
|
41
|
+
ToFloat = __decorate([
|
|
42
|
+
(0, function_metadata_1.FunctionDef)({
|
|
43
|
+
description: "Converts a value to a floating point number",
|
|
44
|
+
category: "scalar",
|
|
45
|
+
parameters: [
|
|
46
|
+
{
|
|
47
|
+
name: "value",
|
|
48
|
+
description: "The value to convert to a float",
|
|
49
|
+
type: "any",
|
|
50
|
+
},
|
|
51
|
+
],
|
|
52
|
+
output: {
|
|
53
|
+
description: "The floating point representation of the value",
|
|
54
|
+
type: "number",
|
|
55
|
+
example: "3.14",
|
|
56
|
+
},
|
|
57
|
+
examples: ['RETURN toFloat("3.14")', "RETURN toFloat(42)", "RETURN toFloat(true)"],
|
|
58
|
+
})
|
|
59
|
+
], ToFloat);
|
|
60
|
+
exports.default = ToFloat;
|
|
61
|
+
//# sourceMappingURL=to_float.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"to_float.js","sourceRoot":"","sources":["../../../src/parsing/functions/to_float.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,0DAAkC;AAClC,2DAAkD;AAmBlD,IAAM,OAAO,GAAb,MAAM,OAAQ,SAAQ,kBAAQ;IAC1B;QACI,KAAK,CAAC,SAAS,CAAC,CAAC;QACjB,IAAI,CAAC,uBAAuB,GAAG,CAAC,CAAC;IACrC,CAAC;IAEM,KAAK;QACR,MAAM,GAAG,GAAG,IAAI,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC,CAAC,KAAK,EAAE,CAAC;QAC1C,IAAI,GAAG,KAAK,IAAI,IAAI,GAAG,KAAK,SAAS,EAAE,CAAC;YACpC,OAAO,IAAI,CAAC;QAChB,CAAC;QACD,IAAI,OAAO,GAAG,KAAK,SAAS,EAAE,CAAC;YAC3B,OAAO,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC;QAC3B,CAAC;QACD,IAAI,OAAO,GAAG,KAAK,QAAQ,EAAE,CAAC;YAC1B,OAAO,GAAG,CAAC;QACf,CAAC;QACD,IAAI,OAAO,GAAG,KAAK,QAAQ,EAAE,CAAC;YAC1B,MAAM,OAAO,GAAG,GAAG,CAAC,IAAI,EAAE,CAAC;YAC3B,MAAM,MAAM,GAAG,MAAM,CAAC,OAAO,CAAC,CAAC;YAC/B,IAAI,KAAK,CAAC,MAAM,CAAC,EAAE,CAAC;gBAChB,MAAM,IAAI,KAAK,CAAC,0BAA0B,GAAG,YAAY,CAAC,CAAC;YAC/D,CAAC;YACD,OAAO,MAAM,CAAC;QAClB,CAAC;QACD,MAAM,IAAI,KAAK,CAAC,gDAAgD,CAAC,CAAC;IACtE,CAAC;CACJ,CAAA;AA3BK,OAAO;IAjBZ,IAAA,+BAAW,EAAC;QACT,WAAW,EAAE,6CAA6C;QAC1D,QAAQ,EAAE,QAAQ;QAClB,UAAU,EAAE;YACR;gBACI,IAAI,EAAE,OAAO;gBACb,WAAW,EAAE,iCAAiC;gBAC9C,IAAI,EAAE,KAAK;aACd;SACJ;QACD,MAAM,EAAE;YACJ,WAAW,EAAE,gDAAgD;YAC7D,IAAI,EAAE,QAAQ;YACd,OAAO,EAAE,MAAM;SAClB;QACD,QAAQ,EAAE,CAAC,wBAAwB,EAAE,oBAAoB,EAAE,sBAAsB,CAAC;KACrF,CAAC;GACI,OAAO,CA2BZ;AAED,kBAAe,OAAO,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"to_integer.d.ts","sourceRoot":"","sources":["../../../src/parsing/functions/to_integer.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,MAAM,YAAY,CAAC;AAGlC,cAiBM,SAAU,SAAQ,QAAQ;;IAMrB,KAAK,IAAI,GAAG;CAqBtB;AAED,eAAe,SAAS,CAAC"}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
9
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
const function_1 = __importDefault(require("./function"));
|
|
13
|
+
const function_metadata_1 = require("./function_metadata");
|
|
14
|
+
let ToInteger = class ToInteger extends function_1.default {
|
|
15
|
+
constructor() {
|
|
16
|
+
super("tointeger");
|
|
17
|
+
this._expectedParameterCount = 1;
|
|
18
|
+
}
|
|
19
|
+
value() {
|
|
20
|
+
const val = this.getChildren()[0].value();
|
|
21
|
+
if (val === null || val === undefined) {
|
|
22
|
+
return null;
|
|
23
|
+
}
|
|
24
|
+
if (typeof val === "boolean") {
|
|
25
|
+
return val ? 1 : 0;
|
|
26
|
+
}
|
|
27
|
+
if (typeof val === "number") {
|
|
28
|
+
return Math.trunc(val);
|
|
29
|
+
}
|
|
30
|
+
if (typeof val === "string") {
|
|
31
|
+
const trimmed = val.trim();
|
|
32
|
+
const parsed = Number(trimmed);
|
|
33
|
+
if (isNaN(parsed)) {
|
|
34
|
+
throw new Error(`Cannot convert string "${val}" to integer`);
|
|
35
|
+
}
|
|
36
|
+
return Math.trunc(parsed);
|
|
37
|
+
}
|
|
38
|
+
throw new Error("toInteger() expects a number, string, or boolean");
|
|
39
|
+
}
|
|
40
|
+
};
|
|
41
|
+
ToInteger = __decorate([
|
|
42
|
+
(0, function_metadata_1.FunctionDef)({
|
|
43
|
+
description: "Converts a value to an integer",
|
|
44
|
+
category: "scalar",
|
|
45
|
+
parameters: [
|
|
46
|
+
{
|
|
47
|
+
name: "value",
|
|
48
|
+
description: "The value to convert to an integer",
|
|
49
|
+
type: "any",
|
|
50
|
+
},
|
|
51
|
+
],
|
|
52
|
+
output: {
|
|
53
|
+
description: "The integer representation of the value",
|
|
54
|
+
type: "number",
|
|
55
|
+
example: "42",
|
|
56
|
+
},
|
|
57
|
+
examples: ['RETURN toInteger("42")', "RETURN toInteger(3.14)", "RETURN toInteger(true)"],
|
|
58
|
+
})
|
|
59
|
+
], ToInteger);
|
|
60
|
+
exports.default = ToInteger;
|
|
61
|
+
//# sourceMappingURL=to_integer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"to_integer.js","sourceRoot":"","sources":["../../../src/parsing/functions/to_integer.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,0DAAkC;AAClC,2DAAkD;AAmBlD,IAAM,SAAS,GAAf,MAAM,SAAU,SAAQ,kBAAQ;IAC5B;QACI,KAAK,CAAC,WAAW,CAAC,CAAC;QACnB,IAAI,CAAC,uBAAuB,GAAG,CAAC,CAAC;IACrC,CAAC;IAEM,KAAK;QACR,MAAM,GAAG,GAAG,IAAI,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC,CAAC,KAAK,EAAE,CAAC;QAC1C,IAAI,GAAG,KAAK,IAAI,IAAI,GAAG,KAAK,SAAS,EAAE,CAAC;YACpC,OAAO,IAAI,CAAC;QAChB,CAAC;QACD,IAAI,OAAO,GAAG,KAAK,SAAS,EAAE,CAAC;YAC3B,OAAO,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QACvB,CAAC;QACD,IAAI,OAAO,GAAG,KAAK,QAAQ,EAAE,CAAC;YAC1B,OAAO,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;QAC3B,CAAC;QACD,IAAI,OAAO,GAAG,KAAK,QAAQ,EAAE,CAAC;YAC1B,MAAM,OAAO,GAAG,GAAG,CAAC,IAAI,EAAE,CAAC;YAC3B,MAAM,MAAM,GAAG,MAAM,CAAC,OAAO,CAAC,CAAC;YAC/B,IAAI,KAAK,CAAC,MAAM,CAAC,EAAE,CAAC;gBAChB,MAAM,IAAI,KAAK,CAAC,0BAA0B,GAAG,cAAc,CAAC,CAAC;YACjE,CAAC;YACD,OAAO,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;QAC9B,CAAC;QACD,MAAM,IAAI,KAAK,CAAC,kDAAkD,CAAC,CAAC;IACxE,CAAC;CACJ,CAAA;AA3BK,SAAS;IAjBd,IAAA,+BAAW,EAAC;QACT,WAAW,EAAE,gCAAgC;QAC7C,QAAQ,EAAE,QAAQ;QAClB,UAAU,EAAE;YACR;gBACI,IAAI,EAAE,OAAO;gBACb,WAAW,EAAE,oCAAoC;gBACjD,IAAI,EAAE,KAAK;aACd;SACJ;QACD,MAAM,EAAE;YACJ,WAAW,EAAE,yCAAyC;YACtD,IAAI,EAAE,QAAQ;YACd,OAAO,EAAE,IAAI;SAChB;QACD,QAAQ,EAAE,CAAC,wBAAwB,EAAE,wBAAwB,EAAE,wBAAwB,CAAC;KAC3F,CAAC;GACI,SAAS,CA2Bd;AAED,kBAAe,SAAS,CAAC"}
|