@lowgular/code-graph 0.0.1 → 0.1.2
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/bin/cli.js +2463 -0
- package/lib.js +2430 -0
- package/package.json +26 -7
- package/apps/code-graph/src/main.js +0 -50
- package/libs/cli/code-graph/src/index.js +0 -39
- package/libs/cli/code-graph/src/lib/class-declarations/abstractions/service.js +0 -72
- package/libs/cli/code-graph/src/lib/class-declarations/abstractions/service.stateful.js +0 -68
- package/libs/cli/code-graph/src/lib/class-declarations/class-declarations.doc.js +0 -147
- package/libs/cli/code-graph/src/lib/class-declarations/class-declarations.graph.js +0 -55
- package/libs/cli/code-graph/src/lib/class-declarations/index.js +0 -27
- package/libs/cli/code-graph/src/lib/code.graph.factory.js +0 -63
- package/libs/cli/code-graph/src/lib/code.graph.js +0 -62
- package/libs/cli/code-graph/src/lib/core/core.js +0 -58
- package/libs/cli/code-graph/src/lib/core.js +0 -85
- package/libs/cli/code-graph/src/lib/decorators/index.js +0 -36
- package/libs/cli/code-graph/src/lib/docs/index.js +0 -21
- package/libs/cli/code-graph/src/lib/docs/specs.js +0 -36
- package/libs/cli/code-graph/src/lib/expressions/call-expressions.graph.js +0 -28
- package/libs/cli/code-graph/src/lib/fixtures/reactive-event-bus/src/app/examples.event-bus.js +0 -53
- package/libs/cli/code-graph/src/lib/method-declarations/index.js +0 -23
- package/libs/cli/code-graph/src/lib/method-declarations/method-declarations.doc.js +0 -106
- package/libs/cli/code-graph/src/lib/method-declarations/method-declarations.graph.js +0 -56
- package/libs/cli/code-graph/src/lib/parameters/index.js +0 -42
- package/libs/cli/code-graph/src/lib/property-declarations/abstractions/reactive-state.evals.js +0 -139
- package/libs/cli/code-graph/src/lib/property-declarations/abstractions/reactive-state.js +0 -104
- package/libs/cli/code-graph/src/lib/property-declarations/index.js +0 -25
- package/libs/cli/code-graph/src/lib/property-declarations/property-declarations.doc.js +0 -74
- package/libs/cli/code-graph/src/lib/property-declarations/property-declarations.graph.js +0 -43
- package/libs/cli/code-graph/src/lib/tools/index.js +0 -34
- package/libs/cli/code-graph/src/lib/tools/match-code-graph.tool.js +0 -64
- package/libs/cli/code-graph/src/lib/types/index.js +0 -99
- package/libs/cli/code-graph/src/lib/v2/extractors/extractor.doc.js +0 -345
- package/libs/cli/code-graph/src/lib/v2/extractors/extractor.js +0 -52
- package/libs/cli/code-graph/src/lib/v2/extractors/index.js +0 -23
- package/libs/cli/code-graph/src/lib/v2/graph-builder/code-graph.builder.js +0 -76
- package/libs/cli/code-graph/src/lib/v2/graph-builder/index.js +0 -21
- package/libs/cli/code-graph/src/lib/v2/graph-builder/node.processor.js +0 -48
- package/libs/cli/code-graph/src/lib/v2/graph-builder/relationship.processor.js +0 -79
- package/libs/cli/code-graph/src/lib/v2/graph-builder/type.processor.js +0 -45
- package/libs/cli/code-graph/src/lib/v2/index.js +0 -37
- package/libs/cli/code-graph/src/lib/v2/tools/build-code-graph.doc.js +0 -220
- package/libs/cli/code-graph/src/lib/v2/tools/build-code-graph.tool.js +0 -42
- package/libs/cli/cypher/src/index.js +0 -25
- package/libs/cli/cypher/src/lib/docs/features/advanced-optional-match.feature.js +0 -277
- package/libs/cli/cypher/src/lib/docs/features/anonymous-relationship.feature.js +0 -69
- package/libs/cli/cypher/src/lib/docs/features/anonymous-variable-length.feature.js +0 -105
- package/libs/cli/cypher/src/lib/docs/features/basic-filtering.feature.js +0 -70
- package/libs/cli/cypher/src/lib/docs/features/basic-optional-match.feature.js +0 -99
- package/libs/cli/cypher/src/lib/docs/features/basic-relationship.feature.js +0 -125
- package/libs/cli/cypher/src/lib/docs/features/index.js +0 -51
- package/libs/cli/cypher/src/lib/docs/features/limit.feature.js +0 -50
- package/libs/cli/cypher/src/lib/docs/features/match-nodes.feature.js +0 -106
- package/libs/cli/cypher/src/lib/docs/features/multiple-relationship-types.feature.js +0 -105
- package/libs/cli/cypher/src/lib/docs/features/order-by.feature.js +0 -143
- package/libs/cli/cypher/src/lib/docs/features/property-matching.feature.js +0 -152
- package/libs/cli/cypher/src/lib/docs/features/relationship-without-variable.feature.js +0 -48
- package/libs/cli/cypher/src/lib/docs/features/return-statement.feature.js +0 -65
- package/libs/cli/cypher/src/lib/docs/features/unidirected-relationship.feature.js +0 -82
- package/libs/cli/cypher/src/lib/docs/features/variable-length-path.feature.js +0 -136
- package/libs/cli/cypher/src/lib/docs/features/where-conditional.feature.js +0 -187
- package/libs/cli/cypher/src/lib/docs/features/where-operators.feature.js +0 -302
- package/libs/cli/cypher/src/lib/docs/prompts.js +0 -36
- package/libs/cli/cypher/src/lib/docs/specs.js +0 -181
- package/libs/cli/cypher/src/lib/executor/condition-evaluator.js +0 -158
- package/libs/cli/cypher/src/lib/executor/executor.js +0 -83
- package/libs/cli/cypher/src/lib/executor/graph.js +0 -15
- package/libs/cli/cypher/src/lib/executor/match-engine.js +0 -153
- package/libs/cli/cypher/src/lib/executor/pattern-matcher.js +0 -109
- package/libs/cli/cypher/src/lib/executor/relationship-navigator.js +0 -64
- package/libs/cli/cypher/src/lib/executor/result-formatter.js +0 -143
- package/libs/cli/cypher/src/lib/executor/traverse-engine.js +0 -164
- package/libs/cli/cypher/src/lib/executor/utils.js +0 -37
- package/libs/cli/cypher/src/lib/graph.stub.js +0 -63
- package/libs/cli/cypher/src/lib/index.js +0 -74
- package/libs/cli/cypher/src/lib/lexer.js +0 -398
- package/libs/cli/cypher/src/lib/parser.js +0 -602
- package/libs/cli/cypher/src/lib/validator/query-validator.js +0 -95
- package/libs/cli/cypher/src/lib/validator/supported-features.config.js +0 -111
- package/libs/cli/cypher/src/lib/validator/unsupported-features.config.js +0 -150
- package/libs/cli/shared/src/index.js +0 -53
- package/libs/cli/shared/src/lib/admin-token.js +0 -121
- package/libs/cli/shared/src/lib/config.js +0 -49
- package/libs/cli/shared/src/lib/consts.js +0 -57
- package/libs/cli/shared/src/lib/core.js +0 -46
- package/libs/cli/shared/src/lib/infrastructure/cli.js +0 -47
- package/libs/cli/shared/src/lib/infrastructure/config.js +0 -47
- package/libs/cli/shared/src/lib/infrastructure/config.reporitory.js +0 -51
- package/libs/cli/shared/src/lib/infrastructure/formatters/console-formatter.js +0 -96
- package/libs/cli/shared/src/lib/infrastructure/formatters/index.js +0 -41
- package/libs/cli/shared/src/lib/infrastructure/formatters/json-formatter.js +0 -64
- package/libs/cli/shared/src/lib/infrastructure/formatters/markdown-formatter.js +0 -120
- package/libs/cli/shared/src/lib/infrastructure/formatters/types.js +0 -15
- package/libs/cli/shared/src/lib/infrastructure/formatters/utils.js +0 -72
- package/libs/cli/shared/src/lib/infrastructure/git.js +0 -147
- package/libs/cli/shared/src/lib/infrastructure/http.js +0 -257
- package/libs/cli/shared/src/lib/infrastructure/markdown.js +0 -95
- package/libs/cli/shared/src/lib/infrastructure/transformers/embeddings.js +0 -88
- package/libs/cli/shared/src/lib/infrastructure/transformers/index.js +0 -25
- package/libs/cli/shared/src/lib/infrastructure/transformers/rag-eval.js +0 -154
- package/libs/cli/shared/src/lib/infrastructure/transformers/similarity.js +0 -210
- package/libs/cli/shared/src/lib/infrastructure/workspace.js +0 -297
- package/libs/cli/shared/src/lib/infrastructure/yaml.js +0 -237
- package/libs/cli/shared/src/lib/lowgular.config.js +0 -120
- package/libs/cli/shared/src/lib/token.js +0 -135
- package/libs/cli/shared/src/lib/utils/solution.util.js +0 -35
- package/libs/cli/shared/src/lib/utils/utils.js +0 -89
- package/libs/cli/typescript/src/index.js +0 -21
- package/libs/cli/typescript/src/lib/base/index.js +0 -23
- package/libs/cli/typescript/src/lib/base/nameable.js +0 -34
- package/libs/cli/typescript/src/lib/base/nodeable.js +0 -36
- package/libs/cli/typescript/src/lib/class.implementation.js +0 -52
- package/libs/cli/typescript/src/lib/core/declaration.registry.js +0 -107
- package/libs/cli/typescript/src/lib/core/design-pattern.js +0 -55
- package/libs/cli/typescript/src/lib/core/index.js +0 -35
- package/libs/cli/typescript/src/lib/core/navigable-declaration.js +0 -69
- package/libs/cli/typescript/src/lib/core/program-context.js +0 -71
- package/libs/cli/typescript/src/lib/core/syntax-kind.utils.js +0 -40
- package/libs/cli/typescript/src/lib/core/type.js +0 -374
- package/libs/cli/typescript/src/lib/declaration.abstraction.js +0 -90
- package/libs/cli/typescript/src/lib/decorator.implementation.js +0 -35
- package/libs/cli/typescript/src/lib/enum.implementation.js +0 -35
- package/libs/cli/typescript/src/lib/function-declaration.implementation.js +0 -35
- package/libs/cli/typescript/src/lib/index.js +0 -57
- package/libs/cli/typescript/src/lib/interface.implementation.js +0 -51
- package/libs/cli/typescript/src/lib/members/method-abstraction.resolver.js +0 -90
- package/libs/cli/typescript/src/lib/members/method-declaration.implementation.js +0 -44
- package/libs/cli/typescript/src/lib/members/method-signature.implementation.js +0 -46
- package/libs/cli/typescript/src/lib/members/method.util.js +0 -32
- package/libs/cli/typescript/src/lib/members/parameter.implementation.js +0 -38
- package/libs/cli/typescript/src/lib/members/property-declaration.implementation.js +0 -64
- package/libs/cli/typescript/src/lib/members/property-signature.implementation.js +0 -34
- package/libs/cli/typescript/src/lib/members/property.util.js +0 -61
- package/libs/cli/typescript/src/lib/members/statements/expressions/binary-expression.implementation.js +0 -42
- package/libs/cli/typescript/src/lib/members/statements/expressions/call-expression.implementation.js +0 -114
- package/libs/cli/typescript/src/lib/members/statements/expressions/expression.abstraction.js +0 -188
- package/libs/cli/typescript/src/lib/members/statements/expressions/property-access-expression.implementation.js +0 -35
- package/libs/cli/typescript/src/lib/members/statements/expressions/unary-expression.implementation.js +0 -51
- package/libs/cli/typescript/src/lib/members/statements/statement.implementation.js +0 -49
- package/libs/cli/typescript/src/lib/members/statements/utils.js +0 -51
- package/libs/cli/typescript/src/lib/plugins/built-in.plugin.js +0 -258
- package/libs/cli/typescript/src/lib/plugins/plugin.interface.js +0 -15
- package/libs/cli/typescript/src/lib/plugins/rxjs.plugin.js +0 -228
- package/libs/cli/typescript/src/lib/plugins/signal.plugin.js +0 -126
- package/libs/cli/typescript/src/lib/plugins/stubs.js +0 -66
- package/libs/cli/typescript/src/lib/type-alias.implementation.js +0 -72
- package/libs/cli/typescript/src/lib/utils.js +0 -39
- package/libs/cli/typescript/src/lib/variable-declaration.implementation.js +0 -35
- package/libs/core/codegular/src/index.js +0 -21
- package/libs/core/codegular/src/lib/index.js +0 -29
- package/libs/core/codegular/src/lib/node.js +0 -112
- package/libs/core/codegular/src/lib/program.js +0 -92
- package/libs/core/codegular/src/lib/string.js +0 -168
- package/libs/core/codegular/src/lib/type-checker.js +0 -170
- package/libs/core/codegular/src/lib/utils.js +0 -347
- package/main.js +0 -43
|
@@ -1,136 +0,0 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
-
var __export = (target, all) => {
|
|
6
|
-
for (var name in all)
|
|
7
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
-
};
|
|
9
|
-
var __copyProps = (to, from, except, desc) => {
|
|
10
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
-
for (let key of __getOwnPropNames(from))
|
|
12
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
-
}
|
|
15
|
-
return to;
|
|
16
|
-
};
|
|
17
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
-
var variable_length_path_feature_exports = {};
|
|
19
|
-
__export(variable_length_path_feature_exports, {
|
|
20
|
-
VARIABLE_LENGTH_PATH_FEATURES: () => VARIABLE_LENGTH_PATH_FEATURES
|
|
21
|
-
});
|
|
22
|
-
module.exports = __toCommonJS(variable_length_path_feature_exports);
|
|
23
|
-
var import_graph2 = require("../../graph.stub");
|
|
24
|
-
const VARIABLE_LENGTH_PATH_FEATURES = [
|
|
25
|
-
{
|
|
26
|
-
name: "Match zero-length path (same node)",
|
|
27
|
-
description: "Variable-length paths with * support zero-length paths, matching when source and target are the same node.",
|
|
28
|
-
graphFactory: () => new import_graph2.GraphBuilder().addNode((0, import_graph2.stubNode)("1", "A")).build(),
|
|
29
|
-
queries: [["MATCH (a:A)-[:R*]->(a)", "RETURN a"]],
|
|
30
|
-
results: [
|
|
31
|
-
{
|
|
32
|
-
a: {
|
|
33
|
-
id: "1"
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
]
|
|
37
|
-
},
|
|
38
|
-
{
|
|
39
|
-
name: "Return empty when no path exists",
|
|
40
|
-
description: "When no path exists between source and target nodes, variable-length path returns no results.",
|
|
41
|
-
graphFactory: () => new import_graph2.GraphBuilder().addNode((0, import_graph2.stubNode)("1", "A")).addNode((0, import_graph2.stubNode)("2", "B")).build(),
|
|
42
|
-
queries: [["MATCH (a:A)-[:R*]->(b:B)", "RETURN a, b"]],
|
|
43
|
-
results: []
|
|
44
|
-
},
|
|
45
|
-
{
|
|
46
|
-
name: "Handle multiple valid paths",
|
|
47
|
-
description: "Variable-length paths find all valid paths between source and target nodes.",
|
|
48
|
-
graphFactory: () => new import_graph2.GraphBuilder().addNode((0, import_graph2.stubNode)("1", "A")).addNode((0, import_graph2.stubNode)("2", "C")).addNode((0, import_graph2.stubNode)("3", "C")).addNode((0, import_graph2.stubNode)("4", "B")).addEdge((0, import_graph2.stubEdge)("1", "2", "R")).addEdge((0, import_graph2.stubEdge)("1", "3", "R")).addEdge((0, import_graph2.stubEdge)("2", "4", "R")).addEdge((0, import_graph2.stubEdge)("3", "4", "R")).build(),
|
|
49
|
-
queries: [["MATCH (a:A)-[r:R*]->(b:B)", "RETURN a, r, b"]],
|
|
50
|
-
results: [
|
|
51
|
-
{
|
|
52
|
-
a: {
|
|
53
|
-
id: "1"
|
|
54
|
-
},
|
|
55
|
-
r: {
|
|
56
|
-
source: "2",
|
|
57
|
-
target: "4",
|
|
58
|
-
type: "R"
|
|
59
|
-
},
|
|
60
|
-
b: {
|
|
61
|
-
id: "4"
|
|
62
|
-
}
|
|
63
|
-
},
|
|
64
|
-
{
|
|
65
|
-
a: {
|
|
66
|
-
id: "1"
|
|
67
|
-
},
|
|
68
|
-
r: {
|
|
69
|
-
source: "3",
|
|
70
|
-
target: "4",
|
|
71
|
-
type: "R"
|
|
72
|
-
},
|
|
73
|
-
b: {
|
|
74
|
-
id: "4"
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
]
|
|
78
|
-
},
|
|
79
|
-
{
|
|
80
|
-
name: "Prevent infinite loops with cycles",
|
|
81
|
-
description: "Variable-length paths handle cycles correctly, preventing infinite loops while still finding valid paths.",
|
|
82
|
-
graphFactory: () => new import_graph2.GraphBuilder().addNode((0, import_graph2.stubNode)("1", "A")).addNode((0, import_graph2.stubNode)("2", "C")).addNode((0, import_graph2.stubNode)("3", "B")).addEdge((0, import_graph2.stubEdge)("1", "2", "R")).addEdge((0, import_graph2.stubEdge)("2", "2", "R")).addEdge((0, import_graph2.stubEdge)("2", "3", "R")).build(),
|
|
83
|
-
queries: [["MATCH (a:A)-[:R*]->(b:B)", "RETURN a, b"]],
|
|
84
|
-
results: [
|
|
85
|
-
{
|
|
86
|
-
a: {
|
|
87
|
-
id: "1"
|
|
88
|
-
},
|
|
89
|
-
b: {
|
|
90
|
-
id: "3"
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
]
|
|
94
|
-
},
|
|
95
|
-
{
|
|
96
|
-
name: "Handle cycle in path but still reach target",
|
|
97
|
-
description: "Variable-length paths can traverse through cycles but still reach the target node without getting stuck.",
|
|
98
|
-
graphFactory: () => new import_graph2.GraphBuilder().addNode((0, import_graph2.stubNode)("1", "A")).addNode((0, import_graph2.stubNode)("2", "C")).addNode((0, import_graph2.stubNode)("3", "C")).addNode((0, import_graph2.stubNode)("4", "B")).addEdge((0, import_graph2.stubEdge)("1", "2", "R")).addEdge((0, import_graph2.stubEdge)("2", "3", "R")).addEdge((0, import_graph2.stubEdge)("3", "2", "R")).addEdge((0, import_graph2.stubEdge)("2", "4", "R")).build(),
|
|
99
|
-
queries: [["MATCH (a:A)-[:R*]->(b:B)", "RETURN a, b"]],
|
|
100
|
-
results: [
|
|
101
|
-
{
|
|
102
|
-
a: {
|
|
103
|
-
id: "1"
|
|
104
|
-
},
|
|
105
|
-
b: {
|
|
106
|
-
id: "4"
|
|
107
|
-
}
|
|
108
|
-
}
|
|
109
|
-
]
|
|
110
|
-
},
|
|
111
|
-
{
|
|
112
|
-
name: "Bind relationship variable in variable-length path",
|
|
113
|
-
description: "When relationship variable is bound in variable-length path, it binds to the last edge in the path.",
|
|
114
|
-
graphFactory: () => new import_graph2.GraphBuilder().addNode((0, import_graph2.stubNode)("1", "A")).addNode((0, import_graph2.stubNode)("2", "C")).addNode((0, import_graph2.stubNode)("3", "B")).addEdge((0, import_graph2.stubEdge)("1", "2", "R")).addEdge((0, import_graph2.stubEdge)("2", "3", "R")).build(),
|
|
115
|
-
queries: [["MATCH (a:A)-[rel:R*]->(b:B)", "RETURN a, rel, b"]],
|
|
116
|
-
results: [
|
|
117
|
-
{
|
|
118
|
-
a: {
|
|
119
|
-
id: "1"
|
|
120
|
-
},
|
|
121
|
-
rel: {
|
|
122
|
-
source: "2",
|
|
123
|
-
target: "3",
|
|
124
|
-
type: "R"
|
|
125
|
-
},
|
|
126
|
-
b: {
|
|
127
|
-
id: "3"
|
|
128
|
-
}
|
|
129
|
-
}
|
|
130
|
-
]
|
|
131
|
-
}
|
|
132
|
-
];
|
|
133
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
134
|
-
0 && (module.exports = {
|
|
135
|
-
VARIABLE_LENGTH_PATH_FEATURES
|
|
136
|
-
});
|
|
@@ -1,187 +0,0 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
-
var __export = (target, all) => {
|
|
6
|
-
for (var name in all)
|
|
7
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
-
};
|
|
9
|
-
var __copyProps = (to, from, except, desc) => {
|
|
10
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
-
for (let key of __getOwnPropNames(from))
|
|
12
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
-
}
|
|
15
|
-
return to;
|
|
16
|
-
};
|
|
17
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
-
var where_conditional_feature_exports = {};
|
|
19
|
-
__export(where_conditional_feature_exports, {
|
|
20
|
-
WHERE_CONDITIONAL_LOGIC_FEATURES: () => WHERE_CONDITIONAL_LOGIC_FEATURES
|
|
21
|
-
});
|
|
22
|
-
module.exports = __toCommonJS(where_conditional_feature_exports);
|
|
23
|
-
var import_graph2 = require("../../graph.stub");
|
|
24
|
-
const WHERE_CONDITIONAL_LOGIC_FEATURES = [
|
|
25
|
-
{
|
|
26
|
-
name: "Filter with OR logic (strings)",
|
|
27
|
-
description: "Use OR operator to filter nodes where property matches any of multiple string values.",
|
|
28
|
-
graphFactory: () => new import_graph2.GraphBuilder().addNode((0, import_graph2.stubNode)("1", "A", { type: "X" })).addNode((0, import_graph2.stubNode)("2", "A", { type: "Y" })).addNode((0, import_graph2.stubNode)("3", "A", { type: "Z" })).build(),
|
|
29
|
-
queries: [
|
|
30
|
-
["MATCH (a:A)", 'WHERE a.type = "X" OR a.type = "Y"', "RETURN a"]
|
|
31
|
-
],
|
|
32
|
-
results: [
|
|
33
|
-
{
|
|
34
|
-
a: {
|
|
35
|
-
id: "1"
|
|
36
|
-
}
|
|
37
|
-
},
|
|
38
|
-
{
|
|
39
|
-
a: {
|
|
40
|
-
id: "2"
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
]
|
|
44
|
-
},
|
|
45
|
-
{
|
|
46
|
-
name: "Filter with OR logic (numbers)",
|
|
47
|
-
description: "Use OR operator to filter nodes where property matches any of multiple number values.",
|
|
48
|
-
graphFactory: () => new import_graph2.GraphBuilder().addNode((0, import_graph2.stubNode)("1", "A", { count: 3 })).addNode((0, import_graph2.stubNode)("2", "A", { count: 5 })).addNode((0, import_graph2.stubNode)("3", "A", { count: 7 })).build(),
|
|
49
|
-
queries: [["MATCH (a:A)", "WHERE a.count = 3 OR a.count = 7", "RETURN a"]],
|
|
50
|
-
results: [
|
|
51
|
-
{
|
|
52
|
-
a: {
|
|
53
|
-
id: "1"
|
|
54
|
-
}
|
|
55
|
-
},
|
|
56
|
-
{
|
|
57
|
-
a: {
|
|
58
|
-
id: "3"
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
]
|
|
62
|
-
},
|
|
63
|
-
{
|
|
64
|
-
name: "Filter with multiple OR conditions",
|
|
65
|
-
description: "Use multiple OR conditions to filter nodes matching any of three or more values.",
|
|
66
|
-
graphFactory: () => new import_graph2.GraphBuilder().addNode((0, import_graph2.stubNode)("1", "A", { type: "X" })).addNode((0, import_graph2.stubNode)("2", "A", { type: "Y" })).addNode((0, import_graph2.stubNode)("3", "A", { type: "Z" })).addNode((0, import_graph2.stubNode)("4", "A", { type: "W" })).build(),
|
|
67
|
-
queries: [
|
|
68
|
-
[
|
|
69
|
-
"MATCH (a:A)",
|
|
70
|
-
'WHERE a.type = "X" OR a.type = "Y" OR a.type = "Z"',
|
|
71
|
-
"RETURN a"
|
|
72
|
-
]
|
|
73
|
-
],
|
|
74
|
-
results: [
|
|
75
|
-
{
|
|
76
|
-
a: {
|
|
77
|
-
id: "1"
|
|
78
|
-
}
|
|
79
|
-
},
|
|
80
|
-
{
|
|
81
|
-
a: {
|
|
82
|
-
id: "2"
|
|
83
|
-
}
|
|
84
|
-
},
|
|
85
|
-
{
|
|
86
|
-
a: {
|
|
87
|
-
id: "3"
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
]
|
|
91
|
-
},
|
|
92
|
-
{
|
|
93
|
-
name: "Filter with multiple AND conditions",
|
|
94
|
-
description: "Use multiple AND conditions to filter nodes where all specified properties match.",
|
|
95
|
-
graphFactory: () => new import_graph2.GraphBuilder().addNode((0, import_graph2.stubNode)("1", "A", { type: "X", count: 5 })).addNode((0, import_graph2.stubNode)("2", "A", { type: "X", count: 3 })).addNode((0, import_graph2.stubNode)("3", "A", { type: "Y", count: 5 })).build(),
|
|
96
|
-
queries: [
|
|
97
|
-
["MATCH (a:A)", 'WHERE a.type = "X" AND a.count = 5', "RETURN a"]
|
|
98
|
-
],
|
|
99
|
-
results: [
|
|
100
|
-
{
|
|
101
|
-
a: {
|
|
102
|
-
id: "1"
|
|
103
|
-
}
|
|
104
|
-
}
|
|
105
|
-
]
|
|
106
|
-
},
|
|
107
|
-
{
|
|
108
|
-
name: "Filter with AND using comparison operators",
|
|
109
|
-
description: "Use AND with comparison operators to filter nodes within a range of values.",
|
|
110
|
-
graphFactory: () => new import_graph2.GraphBuilder().addNode((0, import_graph2.stubNode)("1", "A", { count: 2 })).addNode((0, import_graph2.stubNode)("2", "A", { count: 5 })).addNode((0, import_graph2.stubNode)("3", "A", { count: 7 })).addNode((0, import_graph2.stubNode)("4", "A", { count: 12 })).build(),
|
|
111
|
-
queries: [
|
|
112
|
-
["MATCH (a:A)", "WHERE a.count > 3 AND a.count < 10", "RETURN a"]
|
|
113
|
-
],
|
|
114
|
-
results: [
|
|
115
|
-
{
|
|
116
|
-
a: {
|
|
117
|
-
id: "2"
|
|
118
|
-
}
|
|
119
|
-
},
|
|
120
|
-
{
|
|
121
|
-
a: {
|
|
122
|
-
id: "3"
|
|
123
|
-
}
|
|
124
|
-
}
|
|
125
|
-
]
|
|
126
|
-
},
|
|
127
|
-
{
|
|
128
|
-
name: "Filter with WHERE on relationship pattern (source node)",
|
|
129
|
-
description: "Apply WHERE clause to filter relationship matches based on source node properties.",
|
|
130
|
-
graphFactory: () => new import_graph2.GraphBuilder().addNode((0, import_graph2.stubNode)("1", "A", { count: 3 })).addNode((0, import_graph2.stubNode)("2", "A", { count: 7 })).addNode((0, import_graph2.stubNode)("3", "B")).addEdge((0, import_graph2.stubEdge)("1", "3", "R1")).addEdge((0, import_graph2.stubEdge)("2", "3", "R1")).build(),
|
|
131
|
-
queries: [["MATCH (a:A)-[r:R1]->(:B)", "WHERE a.count > 5", "RETURN a"]],
|
|
132
|
-
results: [
|
|
133
|
-
{
|
|
134
|
-
a: {
|
|
135
|
-
id: "2"
|
|
136
|
-
}
|
|
137
|
-
}
|
|
138
|
-
]
|
|
139
|
-
},
|
|
140
|
-
{
|
|
141
|
-
name: "Filter with WHERE on relationship pattern (target node)",
|
|
142
|
-
description: "Apply WHERE clause to filter relationship matches based on target node properties.",
|
|
143
|
-
graphFactory: () => new import_graph2.GraphBuilder().addNode((0, import_graph2.stubNode)("1", "A")).addNode((0, import_graph2.stubNode)("2", "B", { type: "X" })).addNode((0, import_graph2.stubNode)("3", "B", { type: "Y" })).addEdge((0, import_graph2.stubEdge)("1", "2", "R1")).addEdge((0, import_graph2.stubEdge)("1", "3", "R1")).build(),
|
|
144
|
-
queries: [
|
|
145
|
-
["MATCH (a:A)-[:R1]->(b:B)", 'WHERE b.type = "X"', "RETURN a, b"]
|
|
146
|
-
],
|
|
147
|
-
results: [
|
|
148
|
-
{
|
|
149
|
-
a: {
|
|
150
|
-
id: "1"
|
|
151
|
-
},
|
|
152
|
-
b: {
|
|
153
|
-
id: "2"
|
|
154
|
-
}
|
|
155
|
-
}
|
|
156
|
-
]
|
|
157
|
-
},
|
|
158
|
-
{
|
|
159
|
-
name: "Filter with WHERE on 2-hop relationship pattern",
|
|
160
|
-
description: "Apply WHERE clause to filter multi-hop relationship matches based on properties of nodes at different hops.",
|
|
161
|
-
graphFactory: () => new import_graph2.GraphBuilder().addNode((0, import_graph2.stubNode)("1", "A", { count: 5 })).addNode((0, import_graph2.stubNode)("2", "A", { count: 3 })).addNode((0, import_graph2.stubNode)("3", "B")).addNode((0, import_graph2.stubNode)("4", "C", { type: "X" })).addNode((0, import_graph2.stubNode)("5", "C", { type: "Y" })).addEdge((0, import_graph2.stubEdge)("1", "3", "R1")).addEdge((0, import_graph2.stubEdge)("2", "3", "R1")).addEdge((0, import_graph2.stubEdge)("3", "4", "R2")).addEdge((0, import_graph2.stubEdge)("3", "5", "R2")).build(),
|
|
162
|
-
queries: [
|
|
163
|
-
[
|
|
164
|
-
"MATCH (a:A)-[:R1]->(b:B)-[:R2]->(c:C)",
|
|
165
|
-
'WHERE a.count = 5 AND c.type = "X"',
|
|
166
|
-
"RETURN a, b, c"
|
|
167
|
-
]
|
|
168
|
-
],
|
|
169
|
-
results: [
|
|
170
|
-
{
|
|
171
|
-
a: {
|
|
172
|
-
id: "1"
|
|
173
|
-
},
|
|
174
|
-
b: {
|
|
175
|
-
id: "3"
|
|
176
|
-
},
|
|
177
|
-
c: {
|
|
178
|
-
id: "4"
|
|
179
|
-
}
|
|
180
|
-
}
|
|
181
|
-
]
|
|
182
|
-
}
|
|
183
|
-
];
|
|
184
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
185
|
-
0 && (module.exports = {
|
|
186
|
-
WHERE_CONDITIONAL_LOGIC_FEATURES
|
|
187
|
-
});
|
|
@@ -1,302 +0,0 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
-
var __export = (target, all) => {
|
|
6
|
-
for (var name in all)
|
|
7
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
-
};
|
|
9
|
-
var __copyProps = (to, from, except, desc) => {
|
|
10
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
-
for (let key of __getOwnPropNames(from))
|
|
12
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
-
}
|
|
15
|
-
return to;
|
|
16
|
-
};
|
|
17
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
-
var where_operators_feature_exports = {};
|
|
19
|
-
__export(where_operators_feature_exports, {
|
|
20
|
-
WHERE_OPERATORS_FEATURES: () => WHERE_OPERATORS_FEATURES
|
|
21
|
-
});
|
|
22
|
-
module.exports = __toCommonJS(where_operators_feature_exports);
|
|
23
|
-
var import_graph2 = require("../../graph.stub");
|
|
24
|
-
const WHERE_OPERATORS_FEATURES = [
|
|
25
|
-
{
|
|
26
|
-
name: "Filter with != operator",
|
|
27
|
-
description: "Use != operator to filter nodes where property is not equal to a value.",
|
|
28
|
-
graphFactory: () => new import_graph2.GraphBuilder().addNode((0, import_graph2.stubNode)("1", "A", { count: 3 })).addNode((0, import_graph2.stubNode)("2", "A", { count: 5 })).addNode((0, import_graph2.stubNode)("3", "A", { count: 7 })).build(),
|
|
29
|
-
queries: [["MATCH (a:A)", "WHERE a.count != 5", "RETURN a"]],
|
|
30
|
-
results: [
|
|
31
|
-
{
|
|
32
|
-
a: {
|
|
33
|
-
id: "1"
|
|
34
|
-
}
|
|
35
|
-
},
|
|
36
|
-
{
|
|
37
|
-
a: {
|
|
38
|
-
id: "3"
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
]
|
|
42
|
-
},
|
|
43
|
-
{
|
|
44
|
-
name: "Filter with > operator",
|
|
45
|
-
description: "Use > operator to filter nodes where property is greater than a value.",
|
|
46
|
-
graphFactory: () => new import_graph2.GraphBuilder().addNode((0, import_graph2.stubNode)("1", "A", { count: 3 })).addNode((0, import_graph2.stubNode)("2", "A", { count: 5 })).addNode((0, import_graph2.stubNode)("3", "A", { count: 7 })).addNode((0, import_graph2.stubNode)("4", "A", { count: 10 })).build(),
|
|
47
|
-
queries: [["MATCH (a:A)", "WHERE a.count > 5", "RETURN a"]],
|
|
48
|
-
results: [
|
|
49
|
-
{
|
|
50
|
-
a: {
|
|
51
|
-
id: "3"
|
|
52
|
-
}
|
|
53
|
-
},
|
|
54
|
-
{
|
|
55
|
-
a: {
|
|
56
|
-
id: "4"
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
]
|
|
60
|
-
},
|
|
61
|
-
{
|
|
62
|
-
name: "Filter with < operator",
|
|
63
|
-
description: "Use < operator to filter nodes where property is less than a value.",
|
|
64
|
-
graphFactory: () => new import_graph2.GraphBuilder().addNode((0, import_graph2.stubNode)("1", "A", { count: 3 })).addNode((0, import_graph2.stubNode)("2", "A", { count: 5 })).addNode((0, import_graph2.stubNode)("3", "A", { count: 7 })).build(),
|
|
65
|
-
queries: [["MATCH (a:A)", "WHERE a.count < 5", "RETURN a"]],
|
|
66
|
-
results: [
|
|
67
|
-
{
|
|
68
|
-
a: {
|
|
69
|
-
id: "1"
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
]
|
|
73
|
-
},
|
|
74
|
-
{
|
|
75
|
-
name: "Filter with >= operator",
|
|
76
|
-
description: "Use >= operator to filter nodes where property is greater than or equal to a value.",
|
|
77
|
-
graphFactory: () => new import_graph2.GraphBuilder().addNode((0, import_graph2.stubNode)("1", "A", { count: 3 })).addNode((0, import_graph2.stubNode)("2", "A", { count: 5 })).addNode((0, import_graph2.stubNode)("3", "A", { count: 7 })).build(),
|
|
78
|
-
queries: [["MATCH (a:A)", "WHERE a.count >= 5", "RETURN a"]],
|
|
79
|
-
results: [
|
|
80
|
-
{
|
|
81
|
-
a: {
|
|
82
|
-
id: "2"
|
|
83
|
-
}
|
|
84
|
-
},
|
|
85
|
-
{
|
|
86
|
-
a: {
|
|
87
|
-
id: "3"
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
]
|
|
91
|
-
},
|
|
92
|
-
{
|
|
93
|
-
name: "Filter with <= operator",
|
|
94
|
-
description: "Use <= operator to filter nodes where property is less than or equal to a value.",
|
|
95
|
-
graphFactory: () => new import_graph2.GraphBuilder().addNode((0, import_graph2.stubNode)("1", "A", { count: 3 })).addNode((0, import_graph2.stubNode)("2", "A", { count: 5 })).addNode((0, import_graph2.stubNode)("3", "A", { count: 7 })).build(),
|
|
96
|
-
queries: [["MATCH (a:A)", "WHERE a.count <= 5", "RETURN a"]],
|
|
97
|
-
results: [
|
|
98
|
-
{
|
|
99
|
-
a: {
|
|
100
|
-
id: "1"
|
|
101
|
-
}
|
|
102
|
-
},
|
|
103
|
-
{
|
|
104
|
-
a: {
|
|
105
|
-
id: "2"
|
|
106
|
-
}
|
|
107
|
-
}
|
|
108
|
-
]
|
|
109
|
-
},
|
|
110
|
-
{
|
|
111
|
-
name: "Filter with IN operator (strings)",
|
|
112
|
-
description: "Use IN operator to filter nodes where property value is in a list of strings.",
|
|
113
|
-
graphFactory: () => new import_graph2.GraphBuilder().addNode((0, import_graph2.stubNode)("1", "A", { type: "X" })).addNode((0, import_graph2.stubNode)("2", "A", { type: "Y" })).addNode((0, import_graph2.stubNode)("3", "A", { type: "Z" })).build(),
|
|
114
|
-
queries: [["MATCH (a:A)", 'WHERE a.type IN ["X", "Y"]', "RETURN a"]],
|
|
115
|
-
results: [
|
|
116
|
-
{
|
|
117
|
-
a: {
|
|
118
|
-
id: "1"
|
|
119
|
-
}
|
|
120
|
-
},
|
|
121
|
-
{
|
|
122
|
-
a: {
|
|
123
|
-
id: "2"
|
|
124
|
-
}
|
|
125
|
-
}
|
|
126
|
-
]
|
|
127
|
-
},
|
|
128
|
-
{
|
|
129
|
-
name: "Filter with IN operator (numbers)",
|
|
130
|
-
description: "Use IN operator to filter nodes where property value is in a list of numbers.",
|
|
131
|
-
graphFactory: () => new import_graph2.GraphBuilder().addNode((0, import_graph2.stubNode)("1", "A", { count: 3 })).addNode((0, import_graph2.stubNode)("2", "A", { count: 5 })).addNode((0, import_graph2.stubNode)("3", "A", { count: 7 })).addNode((0, import_graph2.stubNode)("4", "A", { count: 9 })).build(),
|
|
132
|
-
queries: [["MATCH (a:A)", "WHERE a.count IN [5, 7, 10]", "RETURN a"]],
|
|
133
|
-
results: [
|
|
134
|
-
{
|
|
135
|
-
a: {
|
|
136
|
-
id: "2"
|
|
137
|
-
}
|
|
138
|
-
},
|
|
139
|
-
{
|
|
140
|
-
a: {
|
|
141
|
-
id: "3"
|
|
142
|
-
}
|
|
143
|
-
}
|
|
144
|
-
]
|
|
145
|
-
},
|
|
146
|
-
{
|
|
147
|
-
name: "Filter with NOT IN operator (strings)",
|
|
148
|
-
description: "Use NOT IN operator to filter nodes where property value is not in a list of strings.",
|
|
149
|
-
graphFactory: () => new import_graph2.GraphBuilder().addNode((0, import_graph2.stubNode)("1", "A", { type: "X" })).addNode((0, import_graph2.stubNode)("2", "A", { type: "Y" })).addNode((0, import_graph2.stubNode)("3", "A", { type: "Z" })).build(),
|
|
150
|
-
queries: [["MATCH (a:A)", 'WHERE a.type NOT IN ["X", "Y"]', "RETURN a"]],
|
|
151
|
-
results: [
|
|
152
|
-
{
|
|
153
|
-
a: {
|
|
154
|
-
id: "3"
|
|
155
|
-
}
|
|
156
|
-
}
|
|
157
|
-
]
|
|
158
|
-
},
|
|
159
|
-
{
|
|
160
|
-
name: "Filter with NOT IN operator (numbers)",
|
|
161
|
-
description: "Use NOT IN operator to filter nodes where property value is not in a list of numbers.",
|
|
162
|
-
graphFactory: () => new import_graph2.GraphBuilder().addNode((0, import_graph2.stubNode)("1", "A", { count: 3 })).addNode((0, import_graph2.stubNode)("2", "A", { count: 5 })).addNode((0, import_graph2.stubNode)("3", "A", { count: 7 })).addNode((0, import_graph2.stubNode)("4", "A", { count: 10 })).build(),
|
|
163
|
-
queries: [["MATCH (a:A)", "WHERE a.count NOT IN [5, 7]", "RETURN a"]],
|
|
164
|
-
results: [
|
|
165
|
-
{
|
|
166
|
-
a: {
|
|
167
|
-
id: "1"
|
|
168
|
-
}
|
|
169
|
-
},
|
|
170
|
-
{
|
|
171
|
-
a: {
|
|
172
|
-
id: "4"
|
|
173
|
-
}
|
|
174
|
-
}
|
|
175
|
-
]
|
|
176
|
-
},
|
|
177
|
-
{
|
|
178
|
-
name: "Filter with IS NULL operator",
|
|
179
|
-
description: "Use IS NULL to filter nodes where a property is null or does not exist.",
|
|
180
|
-
graphFactory: () => new import_graph2.GraphBuilder().addNode((0, import_graph2.stubNode)("1", "A", { value: null })).addNode((0, import_graph2.stubNode)("2", "A", { value: "test" })).addNode((0, import_graph2.stubNode)("3", "A", {})).build(),
|
|
181
|
-
queries: [["MATCH (a:A)", "WHERE a.value IS NULL", "RETURN a"]],
|
|
182
|
-
results: [
|
|
183
|
-
{
|
|
184
|
-
a: {
|
|
185
|
-
id: "1"
|
|
186
|
-
}
|
|
187
|
-
},
|
|
188
|
-
{
|
|
189
|
-
a: {
|
|
190
|
-
id: "3"
|
|
191
|
-
}
|
|
192
|
-
}
|
|
193
|
-
]
|
|
194
|
-
},
|
|
195
|
-
{
|
|
196
|
-
name: "Filter with IS NOT NULL operator",
|
|
197
|
-
description: "Use IS NOT NULL to filter nodes where a property exists and is not null.",
|
|
198
|
-
graphFactory: () => new import_graph2.GraphBuilder().addNode((0, import_graph2.stubNode)("1", "A", { value: null })).addNode((0, import_graph2.stubNode)("2", "A", { value: "test" })).addNode((0, import_graph2.stubNode)("3", "A", {})).build(),
|
|
199
|
-
queries: [["MATCH (a:A)", "WHERE a.value IS NOT NULL", "RETURN a"]],
|
|
200
|
-
results: [
|
|
201
|
-
{
|
|
202
|
-
a: {
|
|
203
|
-
id: "2"
|
|
204
|
-
}
|
|
205
|
-
}
|
|
206
|
-
]
|
|
207
|
-
},
|
|
208
|
-
{
|
|
209
|
-
name: "Filter with STARTS WITH operator",
|
|
210
|
-
description: "Use STARTS WITH operator to filter nodes where a string property starts with a specific value.",
|
|
211
|
-
graphFactory: () => new import_graph2.GraphBuilder().addNode((0, import_graph2.stubNode)("1", "A", { name: "apple" })).addNode((0, import_graph2.stubNode)("2", "A", { name: "application" })).addNode((0, import_graph2.stubNode)("3", "A", { name: "banana" })).addNode((0, import_graph2.stubNode)("4", "A", { name: "cherry" })).build(),
|
|
212
|
-
queries: [["MATCH (a:A)", "WHERE a.name STARTS WITH 'app'", "RETURN a"]],
|
|
213
|
-
results: [
|
|
214
|
-
{
|
|
215
|
-
a: {
|
|
216
|
-
id: "1"
|
|
217
|
-
}
|
|
218
|
-
},
|
|
219
|
-
{
|
|
220
|
-
a: {
|
|
221
|
-
id: "2"
|
|
222
|
-
}
|
|
223
|
-
}
|
|
224
|
-
]
|
|
225
|
-
},
|
|
226
|
-
{
|
|
227
|
-
name: "Filter with ENDS WITH operator",
|
|
228
|
-
description: "Use ENDS WITH operator to filter nodes where a string property ends with a specific value.",
|
|
229
|
-
graphFactory: () => new import_graph2.GraphBuilder().addNode((0, import_graph2.stubNode)("1", "A", { name: "apple" })).addNode((0, import_graph2.stubNode)("2", "A", { name: "pineapple" })).addNode((0, import_graph2.stubNode)("3", "A", { name: "banana" })).addNode((0, import_graph2.stubNode)("4", "A", { name: "cherry" })).build(),
|
|
230
|
-
queries: [["MATCH (a:A)", "WHERE a.name ENDS WITH 'le'", "RETURN a"]],
|
|
231
|
-
results: [
|
|
232
|
-
{
|
|
233
|
-
a: {
|
|
234
|
-
id: "1"
|
|
235
|
-
}
|
|
236
|
-
},
|
|
237
|
-
{
|
|
238
|
-
a: {
|
|
239
|
-
id: "2"
|
|
240
|
-
}
|
|
241
|
-
}
|
|
242
|
-
]
|
|
243
|
-
},
|
|
244
|
-
{
|
|
245
|
-
name: "Filter with CONTAINS operator",
|
|
246
|
-
description: "Use CONTAINS operator to filter nodes where a string property contains a specific value.",
|
|
247
|
-
graphFactory: () => new import_graph2.GraphBuilder().addNode((0, import_graph2.stubNode)("1", "A", { name: "apple" })).addNode((0, import_graph2.stubNode)("2", "A", { name: "pineapple" })).addNode((0, import_graph2.stubNode)("3", "A", { name: "banana" })).addNode((0, import_graph2.stubNode)("4", "A", { name: "cherry" })).build(),
|
|
248
|
-
queries: [["MATCH (a:A)", "WHERE a.name CONTAINS 'pp'", "RETURN a"]],
|
|
249
|
-
results: [
|
|
250
|
-
{
|
|
251
|
-
a: {
|
|
252
|
-
id: "1"
|
|
253
|
-
}
|
|
254
|
-
},
|
|
255
|
-
{
|
|
256
|
-
a: {
|
|
257
|
-
id: "2"
|
|
258
|
-
}
|
|
259
|
-
}
|
|
260
|
-
]
|
|
261
|
-
},
|
|
262
|
-
{
|
|
263
|
-
name: "Filter with =~ regex operator (letters only)",
|
|
264
|
-
description: "Use =~ operator to filter nodes where a string property matches a regex pattern. This example matches strings containing only lowercase letters.",
|
|
265
|
-
graphFactory: () => new import_graph2.GraphBuilder().addNode((0, import_graph2.stubNode)("1", "A", { name: "apple" })).addNode((0, import_graph2.stubNode)("2", "A", { name: "application" })).addNode((0, import_graph2.stubNode)("3", "A", { name: "banana" })).addNode((0, import_graph2.stubNode)("4", "A", { name: "cherry123" })).build(),
|
|
266
|
-
queries: [["MATCH (a:A)", "WHERE a.name =~ '^[a-z]+$'", "RETURN a"]],
|
|
267
|
-
results: [
|
|
268
|
-
{
|
|
269
|
-
a: {
|
|
270
|
-
id: "1"
|
|
271
|
-
}
|
|
272
|
-
},
|
|
273
|
-
{
|
|
274
|
-
a: {
|
|
275
|
-
id: "2"
|
|
276
|
-
}
|
|
277
|
-
},
|
|
278
|
-
{
|
|
279
|
-
a: {
|
|
280
|
-
id: "3"
|
|
281
|
-
}
|
|
282
|
-
}
|
|
283
|
-
]
|
|
284
|
-
},
|
|
285
|
-
{
|
|
286
|
-
name: "Filter with =~ regex operator (ends with pattern)",
|
|
287
|
-
description: 'Use =~ operator to filter nodes where a string property matches a regex pattern. This example matches strings ending with "123".',
|
|
288
|
-
graphFactory: () => new import_graph2.GraphBuilder().addNode((0, import_graph2.stubNode)("1", "A", { name: "apple" })).addNode((0, import_graph2.stubNode)("2", "A", { name: "application" })).addNode((0, import_graph2.stubNode)("3", "A", { name: "banana" })).addNode((0, import_graph2.stubNode)("4", "A", { name: "cherry123" })).build(),
|
|
289
|
-
queries: [["MATCH (a:A)", "WHERE a.name =~ '.*123$'", "RETURN a"]],
|
|
290
|
-
results: [
|
|
291
|
-
{
|
|
292
|
-
a: {
|
|
293
|
-
id: "4"
|
|
294
|
-
}
|
|
295
|
-
}
|
|
296
|
-
]
|
|
297
|
-
}
|
|
298
|
-
];
|
|
299
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
300
|
-
0 && (module.exports = {
|
|
301
|
-
WHERE_OPERATORS_FEATURES
|
|
302
|
-
});
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
-
var __export = (target, all) => {
|
|
6
|
-
for (var name in all)
|
|
7
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
-
};
|
|
9
|
-
var __copyProps = (to, from, except, desc) => {
|
|
10
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
-
for (let key of __getOwnPropNames(from))
|
|
12
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
-
}
|
|
15
|
-
return to;
|
|
16
|
-
};
|
|
17
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
-
var prompts_exports = {};
|
|
19
|
-
__export(prompts_exports, {
|
|
20
|
-
FUNCTIONALITY_RESEARCH: () => FUNCTIONALITY_RESEARCH
|
|
21
|
-
});
|
|
22
|
-
module.exports = __toCommonJS(prompts_exports);
|
|
23
|
-
const FUNCTIONALITY_RESEARCH = `you are a cypher expert that needs to implement the cypher query language from neo4j.
|
|
24
|
-
|
|
25
|
-
There is a project that has a lot of it already done and is located in libs/cli/cypher.
|
|
26
|
-
Follow this step by step:
|
|
27
|
-
|
|
28
|
-
- read the docs in libs/cli/cypher/src/lib/docs: that will explain you current supported and unsupported features as well as contrains and limitations
|
|
29
|
-
- read the .spec.ts test files to understand how it works in real life
|
|
30
|
-
- read the source files: index.ts, lexer.ts, parser.ts, validator.ts, executor.ts - this is the core of the project and you will need to understand how it works
|
|
31
|
-
|
|
32
|
-
`;
|
|
33
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
34
|
-
0 && (module.exports = {
|
|
35
|
-
FUNCTIONALITY_RESEARCH
|
|
36
|
-
});
|