@lowgular/code-graph 0.0.1 → 0.1.1
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 +10 -0
- package/code-graph-v2/code.graph.js +37 -0
- package/code-graph-v2/config-from-query.js +131 -0
- package/code-graph-v2/extractors/extractor.js +27 -0
- package/code-graph-v2/extractors/index.js +1 -0
- package/code-graph-v2/graph-builder/code-graph.builder.js +49 -0
- package/code-graph-v2/graph-builder/index.js +1 -0
- package/code-graph-v2/graph-builder/node.processor.js +22 -0
- package/{libs/cli/code-graph/src/lib/v2 → code-graph-v2}/graph-builder/relationship.processor.js +11 -35
- package/code-graph-v2/graph-builder/type.processor.js +21 -0
- package/code-graph-v2/index.js +4 -0
- package/code-graph-v2/tools/build-code-graph.tool.js +19 -0
- package/code-graph-v2/utils.js +34 -0
- package/codegular/index.js +5 -0
- package/codegular/node.js +71 -0
- package/codegular/program.js +100 -0
- package/{libs/core/codegular/src/lib → codegular}/string.js +6 -53
- package/{libs/core/codegular/src/lib → codegular}/type-checker.js +3 -40
- package/codegular/type.js +356 -0
- package/{libs/core/codegular/src/lib → codegular}/utils.js +50 -62
- package/cypher/index.js +1 -0
- package/{libs/cli/cypher/src → cypher}/lib/executor/condition-evaluator.js +2 -25
- package/cypher/lib/executor/executor.js +60 -0
- package/cypher/lib/executor/graph.js +0 -0
- package/{libs/cli/cypher/src → cypher}/lib/executor/match-engine.js +4 -27
- package/{libs/cli/cypher/src → cypher}/lib/executor/pattern-matcher.js +2 -25
- package/{libs/cli/cypher/src → cypher}/lib/executor/relationship-navigator.js +2 -25
- package/{libs/cli/cypher/src → cypher}/lib/executor/result-formatter.js +37 -31
- package/{libs/cli/cypher/src → cypher}/lib/executor/traverse-engine.js +4 -27
- package/cypher/lib/executor/utils.js +14 -0
- package/cypher/lib/graph.stub.js +38 -0
- package/cypher/lib/index.js +32 -0
- package/{libs/cli/cypher/src → cypher}/lib/lexer.js +4 -26
- package/{libs/cli/cypher/src → cypher}/lib/parser.js +119 -135
- package/{libs/cli/cypher/src → cypher}/lib/validator/query-validator.js +12 -32
- package/{libs/cli/cypher/src → cypher}/lib/validator/supported-features.config.js +2 -30
- package/{libs/cli/cypher/src → cypher}/lib/validator/unsupported-features.config.js +8 -34
- package/cypher-cli.js +41 -0
- package/infra/code-graph.js +147 -0
- package/main.js +0 -43
- package/package.json +25 -7
- package/resources-cli.js +75 -0
- package/run-cli.js +43 -0
- 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/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/executor.js +0 -83
- package/libs/cli/cypher/src/lib/executor/graph.js +0 -15
- 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/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
|
@@ -1,125 +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 basic_relationship_feature_exports = {};
|
|
19
|
-
__export(basic_relationship_feature_exports, {
|
|
20
|
-
BASIC_RELATIONSHIP_FEATURES: () => BASIC_RELATIONSHIP_FEATURES
|
|
21
|
-
});
|
|
22
|
-
module.exports = __toCommonJS(basic_relationship_feature_exports);
|
|
23
|
-
var import_graph2 = require("../../graph.stub");
|
|
24
|
-
const BASIC_RELATIONSHIP_FEATURES = [
|
|
25
|
-
{
|
|
26
|
-
name: "Match 1 level deep relationship (outgoing)",
|
|
27
|
-
description: "Match a single outgoing relationship between two nodes. Relationship variable is bound and included in results.",
|
|
28
|
-
graphFactory: () => new import_graph2.GraphBuilder().addNode((0, import_graph2.stubNode)("1", "A")).addNode((0, import_graph2.stubNode)("2", "C")).addEdge((0, import_graph2.stubEdge)("1", "2", "B")).build(),
|
|
29
|
-
queries: [
|
|
30
|
-
["MATCH (n:A)-[rel:B]->(m:C)", "RETURN n, rel, m"],
|
|
31
|
-
["MATCH (m:C)<-[rel:B]-(n:A)", "RETURN n, rel, m"]
|
|
32
|
-
],
|
|
33
|
-
results: [
|
|
34
|
-
{
|
|
35
|
-
n: {
|
|
36
|
-
id: "1"
|
|
37
|
-
},
|
|
38
|
-
rel: {
|
|
39
|
-
source: "1",
|
|
40
|
-
target: "2",
|
|
41
|
-
type: "B"
|
|
42
|
-
},
|
|
43
|
-
m: {
|
|
44
|
-
id: "2"
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
]
|
|
48
|
-
},
|
|
49
|
-
{
|
|
50
|
-
name: "Match 2 levels deep relationship (outgoing)",
|
|
51
|
-
description: "Match a two-hop outgoing relationship pattern. Both relationship variables are bound and included in results.",
|
|
52
|
-
graphFactory: () => new import_graph2.GraphBuilder().addNode((0, import_graph2.stubNode)("1", "A")).addNode((0, import_graph2.stubNode)("2", "C")).addEdge((0, import_graph2.stubEdge)("1", "2", "B")).addNode((0, import_graph2.stubNode)("3", "E")).addEdge((0, import_graph2.stubEdge)("2", "3", "D")).build(),
|
|
53
|
-
queries: [
|
|
54
|
-
[
|
|
55
|
-
"MATCH (n:A)-[rel1:B]->(m:C)-[rel2:D]->(o:E)",
|
|
56
|
-
"RETURN n, rel1, m, rel2, o"
|
|
57
|
-
]
|
|
58
|
-
],
|
|
59
|
-
results: [
|
|
60
|
-
{
|
|
61
|
-
n: {
|
|
62
|
-
id: "1"
|
|
63
|
-
},
|
|
64
|
-
rel1: {
|
|
65
|
-
source: "1",
|
|
66
|
-
target: "2",
|
|
67
|
-
type: "B"
|
|
68
|
-
},
|
|
69
|
-
m: {
|
|
70
|
-
id: "2"
|
|
71
|
-
},
|
|
72
|
-
rel2: {
|
|
73
|
-
source: "2",
|
|
74
|
-
target: "3",
|
|
75
|
-
type: "D"
|
|
76
|
-
},
|
|
77
|
-
o: {
|
|
78
|
-
id: "3"
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
]
|
|
82
|
-
},
|
|
83
|
-
{
|
|
84
|
-
name: "Match 2 levels deep relationship (incoming)",
|
|
85
|
-
description: "Match a two-hop incoming relationship pattern. Both relationship variables are bound and included in results.",
|
|
86
|
-
graphFactory: () => new import_graph2.GraphBuilder().addNode((0, import_graph2.stubNode)("1", "A")).addNode((0, import_graph2.stubNode)("2", "C")).addEdge((0, import_graph2.stubEdge)("1", "2", "B")).addNode((0, import_graph2.stubNode)("3", "E")).addEdge((0, import_graph2.stubEdge)("2", "3", "D")).build(),
|
|
87
|
-
queries: [
|
|
88
|
-
[
|
|
89
|
-
"MATCH (o:E)<-[rel2:D]-(m:C)<-[rel1:B]-(n:A)",
|
|
90
|
-
"RETURN n, rel1, m, rel2, o"
|
|
91
|
-
],
|
|
92
|
-
[
|
|
93
|
-
"MATCH (n:A)-[rel1:B]->(m:C)-[rel2:D]->(o:E)",
|
|
94
|
-
"RETURN n, rel1, m, rel2, o"
|
|
95
|
-
]
|
|
96
|
-
],
|
|
97
|
-
results: [
|
|
98
|
-
{
|
|
99
|
-
n: {
|
|
100
|
-
id: "1"
|
|
101
|
-
},
|
|
102
|
-
rel1: {
|
|
103
|
-
source: "1",
|
|
104
|
-
target: "2",
|
|
105
|
-
type: "B"
|
|
106
|
-
},
|
|
107
|
-
m: {
|
|
108
|
-
id: "2"
|
|
109
|
-
},
|
|
110
|
-
rel2: {
|
|
111
|
-
source: "2",
|
|
112
|
-
target: "3",
|
|
113
|
-
type: "D"
|
|
114
|
-
},
|
|
115
|
-
o: {
|
|
116
|
-
id: "3"
|
|
117
|
-
}
|
|
118
|
-
}
|
|
119
|
-
]
|
|
120
|
-
}
|
|
121
|
-
];
|
|
122
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
123
|
-
0 && (module.exports = {
|
|
124
|
-
BASIC_RELATIONSHIP_FEATURES
|
|
125
|
-
});
|
|
@@ -1,51 +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 __copyProps = (to, from, except, desc) => {
|
|
6
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
7
|
-
for (let key of __getOwnPropNames(from))
|
|
8
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
9
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
10
|
-
}
|
|
11
|
-
return to;
|
|
12
|
-
};
|
|
13
|
-
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
14
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
15
|
-
var features_exports = {};
|
|
16
|
-
module.exports = __toCommonJS(features_exports);
|
|
17
|
-
__reExport(features_exports, require("./advanced-optional-match.feature"), module.exports);
|
|
18
|
-
__reExport(features_exports, require("./anonymous-relationship.feature"), module.exports);
|
|
19
|
-
__reExport(features_exports, require("./anonymous-variable-length.feature"), module.exports);
|
|
20
|
-
__reExport(features_exports, require("./basic-filtering.feature"), module.exports);
|
|
21
|
-
__reExport(features_exports, require("./basic-optional-match.feature"), module.exports);
|
|
22
|
-
__reExport(features_exports, require("./basic-relationship.feature"), module.exports);
|
|
23
|
-
__reExport(features_exports, require("./limit.feature"), module.exports);
|
|
24
|
-
__reExport(features_exports, require("./match-nodes.feature"), module.exports);
|
|
25
|
-
__reExport(features_exports, require("./multiple-relationship-types.feature"), module.exports);
|
|
26
|
-
__reExport(features_exports, require("./order-by.feature"), module.exports);
|
|
27
|
-
__reExport(features_exports, require("./property-matching.feature"), module.exports);
|
|
28
|
-
__reExport(features_exports, require("./relationship-without-variable.feature"), module.exports);
|
|
29
|
-
__reExport(features_exports, require("./unidirected-relationship.feature"), module.exports);
|
|
30
|
-
__reExport(features_exports, require("./variable-length-path.feature"), module.exports);
|
|
31
|
-
__reExport(features_exports, require("./where-conditional.feature"), module.exports);
|
|
32
|
-
__reExport(features_exports, require("./where-operators.feature"), module.exports);
|
|
33
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
34
|
-
0 && (module.exports = {
|
|
35
|
-
...require("./advanced-optional-match.feature"),
|
|
36
|
-
...require("./anonymous-relationship.feature"),
|
|
37
|
-
...require("./anonymous-variable-length.feature"),
|
|
38
|
-
...require("./basic-filtering.feature"),
|
|
39
|
-
...require("./basic-optional-match.feature"),
|
|
40
|
-
...require("./basic-relationship.feature"),
|
|
41
|
-
...require("./limit.feature"),
|
|
42
|
-
...require("./match-nodes.feature"),
|
|
43
|
-
...require("./multiple-relationship-types.feature"),
|
|
44
|
-
...require("./order-by.feature"),
|
|
45
|
-
...require("./property-matching.feature"),
|
|
46
|
-
...require("./relationship-without-variable.feature"),
|
|
47
|
-
...require("./unidirected-relationship.feature"),
|
|
48
|
-
...require("./variable-length-path.feature"),
|
|
49
|
-
...require("./where-conditional.feature"),
|
|
50
|
-
...require("./where-operators.feature")
|
|
51
|
-
});
|
|
@@ -1,50 +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 limit_feature_exports = {};
|
|
19
|
-
__export(limit_feature_exports, {
|
|
20
|
-
LIMIT_FEATURES: () => LIMIT_FEATURES
|
|
21
|
-
});
|
|
22
|
-
module.exports = __toCommonJS(limit_feature_exports);
|
|
23
|
-
var import_graph2 = require("../../graph.stub");
|
|
24
|
-
const LIMIT_FEATURES = [
|
|
25
|
-
{
|
|
26
|
-
name: "Find first 2 ClassDeclarations",
|
|
27
|
-
description: "Use LIMIT to restrict the number of rows returned.",
|
|
28
|
-
graphFactory: () => new import_graph2.GraphBuilder().addNode((0, import_graph2.stubNode)("1", "ClassDeclaration")).addNode((0, import_graph2.stubNode)("2", "ClassDeclaration")).addNode((0, import_graph2.stubNode)("3", "ClassDeclaration")).build(),
|
|
29
|
-
queries: [["MATCH (n:ClassDeclaration)", "RETURN n LIMIT 2"]],
|
|
30
|
-
results: [{ n: { id: "1" } }, { n: { id: "2" } }]
|
|
31
|
-
},
|
|
32
|
-
{
|
|
33
|
-
name: "Find zero ClassDeclaration",
|
|
34
|
-
description: "LIMIT 0 returns no results.",
|
|
35
|
-
graphFactory: () => new import_graph2.GraphBuilder().addNode((0, import_graph2.stubNode)("1", "ClassDeclaration")).build(),
|
|
36
|
-
queries: [["MATCH (n:ClassDeclaration)", "RETURN n LIMIT 0"]],
|
|
37
|
-
results: []
|
|
38
|
-
},
|
|
39
|
-
{
|
|
40
|
-
name: "Find 100 ClassDeclarations",
|
|
41
|
-
description: "If LIMIT exceeds result count, all results are returned.",
|
|
42
|
-
graphFactory: () => new import_graph2.GraphBuilder().addNode((0, import_graph2.stubNode)("1", "ClassDeclaration")).addNode((0, import_graph2.stubNode)("2", "ClassDeclaration")).build(),
|
|
43
|
-
queries: [["MATCH (n:ClassDeclaration)", "RETURN n LIMIT 100"]],
|
|
44
|
-
results: [{ n: { id: "1" } }, { n: { id: "2" } }]
|
|
45
|
-
}
|
|
46
|
-
];
|
|
47
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
48
|
-
0 && (module.exports = {
|
|
49
|
-
LIMIT_FEATURES
|
|
50
|
-
});
|
|
@@ -1,106 +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 match_nodes_feature_exports = {};
|
|
19
|
-
__export(match_nodes_feature_exports, {
|
|
20
|
-
MATCH_NODES_FEATURES: () => MATCH_NODES_FEATURES
|
|
21
|
-
});
|
|
22
|
-
module.exports = __toCommonJS(match_nodes_feature_exports);
|
|
23
|
-
var import_graph2 = require("../../graph.stub");
|
|
24
|
-
const MATCH_NODES_FEATURES = [
|
|
25
|
-
{
|
|
26
|
-
name: "Match all ClassDeclarations",
|
|
27
|
-
description: "Most basic query showing how to match nodes with a specific label.",
|
|
28
|
-
graphFactory: () => new import_graph2.GraphBuilder().addNode((0, import_graph2.stubNode)("1", "ClassDeclaration")).addNode((0, import_graph2.stubNode)("2", "ClassDeclaration")).build(),
|
|
29
|
-
queries: [["MATCH (n:ClassDeclaration)", "RETURN n"]],
|
|
30
|
-
results: [
|
|
31
|
-
{
|
|
32
|
-
n: {
|
|
33
|
-
id: "1"
|
|
34
|
-
}
|
|
35
|
-
},
|
|
36
|
-
{
|
|
37
|
-
n: {
|
|
38
|
-
id: "2"
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
]
|
|
42
|
-
},
|
|
43
|
-
{
|
|
44
|
-
name: "Match all ClassDeclaration and InterfaceDeclaration",
|
|
45
|
-
description: "To match nodes with multiple labels, use a comma separator or two match statements",
|
|
46
|
-
graphFactory: () => new import_graph2.GraphBuilder().addNode((0, import_graph2.stubNode)("1", "ClassDeclaration")).addNode((0, import_graph2.stubNode)("2", "InterfaceDeclaration")).build(),
|
|
47
|
-
queries: [
|
|
48
|
-
["MATCH (a:ClassDeclaration), (b:InterfaceDeclaration)", "RETURN a, b"],
|
|
49
|
-
[
|
|
50
|
-
"MATCH (a:ClassDeclaration)",
|
|
51
|
-
"MATCH (b:InterfaceDeclaration)",
|
|
52
|
-
"RETURN a, b"
|
|
53
|
-
]
|
|
54
|
-
],
|
|
55
|
-
results: [
|
|
56
|
-
{
|
|
57
|
-
a: {
|
|
58
|
-
id: "1"
|
|
59
|
-
},
|
|
60
|
-
b: {
|
|
61
|
-
id: "2"
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
]
|
|
65
|
-
},
|
|
66
|
-
{
|
|
67
|
-
name: "Match all nodes that are ClassDeclaration and ServiceClass",
|
|
68
|
-
description: "Multiple labels with colon separator (e.g., :A:B) require nodes to have ALL specified labels (AND semantics). Only nodes with both A and B labels will match.",
|
|
69
|
-
graphFactory: () => new import_graph2.GraphBuilder().addNode((0, import_graph2.stubNode)("1", ["ClassDeclaration", "ServiceClass"])).addNode((0, import_graph2.stubNode)("2", "ClassDeclaration")).addNode((0, import_graph2.stubNode)("3", "ServiceClass")).build(),
|
|
70
|
-
queries: [["MATCH (n:ClassDeclaration:ServiceClass)", "RETURN n"]],
|
|
71
|
-
results: [
|
|
72
|
-
{
|
|
73
|
-
n: {
|
|
74
|
-
id: "1"
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
]
|
|
78
|
-
},
|
|
79
|
-
{
|
|
80
|
-
name: "Match all nodes that are either ClassDeclaration or ServiceClass",
|
|
81
|
-
description: "Multiple labels with pipe separator (e.g., :A|B) match nodes with ANY of the specified labels (OR semantics). Nodes with either A or B (or both) will match.",
|
|
82
|
-
graphFactory: () => new import_graph2.GraphBuilder().addNode((0, import_graph2.stubNode)("1", ["ClassDeclaration", "ServiceClass"])).addNode((0, import_graph2.stubNode)("2", "ClassDeclaration")).addNode((0, import_graph2.stubNode)("3", "ServiceClass")).build(),
|
|
83
|
-
queries: [["MATCH (n:ClassDeclaration|ServiceClass)", "RETURN n"]],
|
|
84
|
-
results: [
|
|
85
|
-
{
|
|
86
|
-
n: {
|
|
87
|
-
id: "1"
|
|
88
|
-
}
|
|
89
|
-
},
|
|
90
|
-
{
|
|
91
|
-
n: {
|
|
92
|
-
id: "2"
|
|
93
|
-
}
|
|
94
|
-
},
|
|
95
|
-
{
|
|
96
|
-
n: {
|
|
97
|
-
id: "3"
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
]
|
|
101
|
-
}
|
|
102
|
-
];
|
|
103
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
104
|
-
0 && (module.exports = {
|
|
105
|
-
MATCH_NODES_FEATURES
|
|
106
|
-
});
|
|
@@ -1,105 +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 multiple_relationship_types_feature_exports = {};
|
|
19
|
-
__export(multiple_relationship_types_feature_exports, {
|
|
20
|
-
MULTIPLE_RELATIONSHIP_TYPES_FEATURES: () => MULTIPLE_RELATIONSHIP_TYPES_FEATURES
|
|
21
|
-
});
|
|
22
|
-
module.exports = __toCommonJS(multiple_relationship_types_feature_exports);
|
|
23
|
-
var import_graph2 = require("../../graph.stub");
|
|
24
|
-
const MULTIPLE_RELATIONSHIP_TYPES_FEATURES = [
|
|
25
|
-
{
|
|
26
|
-
name: "Match relationship with first type",
|
|
27
|
-
description: "Multiple relationship types can be specified using pipe syntax (e.g., [:R1|R2]). Matches any of the specified types.",
|
|
28
|
-
graphFactory: () => new import_graph2.GraphBuilder().addNode((0, import_graph2.stubNode)("1", "A")).addNode((0, import_graph2.stubNode)("2", "B")).addEdge((0, import_graph2.stubEdge)("1", "2", "R1")).build(),
|
|
29
|
-
queries: [["MATCH (a:A)-[:R1|R2]->(b:B)", "RETURN a, b"]],
|
|
30
|
-
results: [
|
|
31
|
-
{
|
|
32
|
-
a: {
|
|
33
|
-
id: "1"
|
|
34
|
-
},
|
|
35
|
-
b: {
|
|
36
|
-
id: "2"
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
]
|
|
40
|
-
},
|
|
41
|
-
{
|
|
42
|
-
name: "Match relationship with second type",
|
|
43
|
-
description: "Multiple relationship types match any of the specified types, including the second type.",
|
|
44
|
-
graphFactory: () => new import_graph2.GraphBuilder().addNode((0, import_graph2.stubNode)("1", "A")).addNode((0, import_graph2.stubNode)("2", "B")).addEdge((0, import_graph2.stubEdge)("1", "2", "R2")).build(),
|
|
45
|
-
queries: [["MATCH (a:A)-[:R1|R2]->(b:B)", "RETURN a, b"]],
|
|
46
|
-
results: [
|
|
47
|
-
{
|
|
48
|
-
a: {
|
|
49
|
-
id: "1"
|
|
50
|
-
},
|
|
51
|
-
b: {
|
|
52
|
-
id: "2"
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
]
|
|
56
|
-
},
|
|
57
|
-
{
|
|
58
|
-
name: "Not match relationship with different type",
|
|
59
|
-
description: "Relationships with types not in the specified list do not match.",
|
|
60
|
-
graphFactory: () => new import_graph2.GraphBuilder().addNode((0, import_graph2.stubNode)("1", "A")).addNode((0, import_graph2.stubNode)("2", "B")).addEdge((0, import_graph2.stubEdge)("1", "2", "R3")).build(),
|
|
61
|
-
queries: [["MATCH (a:A)-[:R1|R2]->(b:B)", "RETURN a, b"]],
|
|
62
|
-
results: []
|
|
63
|
-
},
|
|
64
|
-
{
|
|
65
|
-
name: "Bind relationship variable with multiple types",
|
|
66
|
-
description: "When relationship variable is bound with multiple types, edge object is included in results.",
|
|
67
|
-
graphFactory: () => new import_graph2.GraphBuilder().addNode((0, import_graph2.stubNode)("1", "A")).addNode((0, import_graph2.stubNode)("2", "B")).addEdge((0, import_graph2.stubEdge)("1", "2", "R1")).build(),
|
|
68
|
-
queries: [["MATCH (a:A)-[rel:R1|R2]->(b:B)", "RETURN a, rel, b"]],
|
|
69
|
-
results: [
|
|
70
|
-
{
|
|
71
|
-
a: {
|
|
72
|
-
id: "1"
|
|
73
|
-
},
|
|
74
|
-
rel: {
|
|
75
|
-
source: "1",
|
|
76
|
-
target: "2",
|
|
77
|
-
type: "R1"
|
|
78
|
-
},
|
|
79
|
-
b: {
|
|
80
|
-
id: "2"
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
]
|
|
84
|
-
},
|
|
85
|
-
{
|
|
86
|
-
name: "Match relationship with three types",
|
|
87
|
-
description: "Multiple relationship types can include three or more types separated by pipes.",
|
|
88
|
-
graphFactory: () => new import_graph2.GraphBuilder().addNode((0, import_graph2.stubNode)("1", "A")).addNode((0, import_graph2.stubNode)("2", "B")).addEdge((0, import_graph2.stubEdge)("1", "2", "R2")).build(),
|
|
89
|
-
queries: [["MATCH (a:A)-[:R1|R2|R3]->(b:B)", "RETURN a, b"]],
|
|
90
|
-
results: [
|
|
91
|
-
{
|
|
92
|
-
a: {
|
|
93
|
-
id: "1"
|
|
94
|
-
},
|
|
95
|
-
b: {
|
|
96
|
-
id: "2"
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
]
|
|
100
|
-
}
|
|
101
|
-
];
|
|
102
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
103
|
-
0 && (module.exports = {
|
|
104
|
-
MULTIPLE_RELATIONSHIP_TYPES_FEATURES
|
|
105
|
-
});
|
|
@@ -1,143 +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 order_by_feature_exports = {};
|
|
19
|
-
__export(order_by_feature_exports, {
|
|
20
|
-
ORDER_BY_FEATURES: () => ORDER_BY_FEATURES
|
|
21
|
-
});
|
|
22
|
-
module.exports = __toCommonJS(order_by_feature_exports);
|
|
23
|
-
var import_graph2 = require("../../graph.stub");
|
|
24
|
-
const ORDER_BY_FEATURES = [
|
|
25
|
-
{
|
|
26
|
-
name: "Find ClassDeclarations sorted by name",
|
|
27
|
-
description: "Use ORDER BY to sort results by a property. Default direction is ASC.",
|
|
28
|
-
graphFactory: () => new import_graph2.GraphBuilder().addNode((0, import_graph2.stubNode)("1", "ClassDeclaration", { name: "Zebra" })).addNode((0, import_graph2.stubNode)("2", "ClassDeclaration", { name: "Alpha" })).addNode((0, import_graph2.stubNode)("3", "ClassDeclaration", { name: "Middle" })).build(),
|
|
29
|
-
queries: [["MATCH (n:ClassDeclaration)", "ORDER BY n.name", "RETURN n"]],
|
|
30
|
-
results: [
|
|
31
|
-
{ n: { id: "2" } },
|
|
32
|
-
// Alpha
|
|
33
|
-
{ n: { id: "3" } },
|
|
34
|
-
// Middle
|
|
35
|
-
{ n: { id: "1" } }
|
|
36
|
-
// Zebra
|
|
37
|
-
]
|
|
38
|
-
},
|
|
39
|
-
{
|
|
40
|
-
name: "Find ClassDeclarations sorted by name ascending",
|
|
41
|
-
description: "Use ORDER BY n.name ASC for explicit ascending order.",
|
|
42
|
-
graphFactory: () => new import_graph2.GraphBuilder().addNode((0, import_graph2.stubNode)("1", "ClassDeclaration", { name: "Zebra" })).addNode((0, import_graph2.stubNode)("2", "ClassDeclaration", { name: "Alpha" })).build(),
|
|
43
|
-
queries: [
|
|
44
|
-
["MATCH (n:ClassDeclaration)", "ORDER BY n.name ASC", "RETURN n"]
|
|
45
|
-
],
|
|
46
|
-
results: [
|
|
47
|
-
{ n: { id: "2" } },
|
|
48
|
-
// Alpha
|
|
49
|
-
{ n: { id: "1" } }
|
|
50
|
-
// Zebra
|
|
51
|
-
]
|
|
52
|
-
},
|
|
53
|
-
{
|
|
54
|
-
name: "Find ClassDeclarations sorted by name ascending",
|
|
55
|
-
description: "Use ORDER BY n.name DESC for descending order.",
|
|
56
|
-
graphFactory: () => new import_graph2.GraphBuilder().addNode((0, import_graph2.stubNode)("1", "ClassDeclaration", { name: "Alpha" })).addNode((0, import_graph2.stubNode)("2", "ClassDeclaration", { name: "Zebra" })).addNode((0, import_graph2.stubNode)("3", "ClassDeclaration", { name: "Middle" })).build(),
|
|
57
|
-
queries: [
|
|
58
|
-
["MATCH (n:ClassDeclaration)", "ORDER BY n.name DESC", "RETURN n"]
|
|
59
|
-
],
|
|
60
|
-
results: [
|
|
61
|
-
{ n: { id: "2" } },
|
|
62
|
-
// Zebra
|
|
63
|
-
{ n: { id: "3" } },
|
|
64
|
-
// Middle
|
|
65
|
-
{ n: { id: "1" } }
|
|
66
|
-
// Alpha
|
|
67
|
-
]
|
|
68
|
-
},
|
|
69
|
-
{
|
|
70
|
-
name: "Find ClassDeclarations sorted by type and name",
|
|
71
|
-
description: "Use ORDER BY with multiple fields for secondary sorting. Example: ORDER BY n.type ASC, n.name ASC.",
|
|
72
|
-
graphFactory: () => new import_graph2.GraphBuilder().addNode(
|
|
73
|
-
(0, import_graph2.stubNode)("1", "ClassDeclaration", { type: "B", name: "Zebra" })
|
|
74
|
-
).addNode((0, import_graph2.stubNode)("2", "ClassDeclaration", { type: "A", name: "Beta" })).addNode(
|
|
75
|
-
(0, import_graph2.stubNode)("3", "ClassDeclaration", { type: "B", name: "Alpha" })
|
|
76
|
-
).addNode((0, import_graph2.stubNode)("4", "ClassDeclaration", { type: "A", name: "Zulu" })).build(),
|
|
77
|
-
queries: [
|
|
78
|
-
[
|
|
79
|
-
"MATCH (n:ClassDeclaration)",
|
|
80
|
-
"ORDER BY n.type ASC, n.name ASC",
|
|
81
|
-
"RETURN n"
|
|
82
|
-
]
|
|
83
|
-
],
|
|
84
|
-
results: [
|
|
85
|
-
{ n: { id: "2" } },
|
|
86
|
-
// A, Beta
|
|
87
|
-
{ n: { id: "4" } },
|
|
88
|
-
// A, Zulu
|
|
89
|
-
{ n: { id: "3" } },
|
|
90
|
-
// B, Alpha
|
|
91
|
-
{ n: { id: "1" } }
|
|
92
|
-
// B, Zebra
|
|
93
|
-
]
|
|
94
|
-
},
|
|
95
|
-
{
|
|
96
|
-
name: 'Which ClassDeclaration has the most lines of code? use "loc" property',
|
|
97
|
-
description: "Combine ORDER BY with LIMIT to get top N results. ORDER BY executes before LIMIT.",
|
|
98
|
-
graphFactory: () => new import_graph2.GraphBuilder().addNode((0, import_graph2.stubNode)("1", "ClassDeclaration", { loc: 100 })).addNode((0, import_graph2.stubNode)("2", "ClassDeclaration", { loc: 599 })).addNode((0, import_graph2.stubNode)("3", "ClassDeclaration", { loc: 20 })).build(),
|
|
99
|
-
queries: [
|
|
100
|
-
["MATCH (n:ClassDeclaration)", "ORDER BY n.loc DESC", "RETURN n LIMIT 1"]
|
|
101
|
-
],
|
|
102
|
-
results: [
|
|
103
|
-
{ n: { id: "2" } }
|
|
104
|
-
// Alpha
|
|
105
|
-
]
|
|
106
|
-
},
|
|
107
|
-
{
|
|
108
|
-
name: "List ClassDeclarations by name ascending",
|
|
109
|
-
description: "Neo4j-style NULL handling: In ASC order, NULLs appear first.",
|
|
110
|
-
graphFactory: () => new import_graph2.GraphBuilder().addNode((0, import_graph2.stubNode)("1", "ClassDeclaration", { name: "Zebra" })).addNode((0, import_graph2.stubNode)("2", "ClassDeclaration", {})).addNode((0, import_graph2.stubNode)("3", "ClassDeclaration", { name: "Alpha" })).build(),
|
|
111
|
-
queries: [
|
|
112
|
-
["MATCH (n:ClassDeclaration)", "ORDER BY n.name ASC", "RETURN n"]
|
|
113
|
-
],
|
|
114
|
-
results: [
|
|
115
|
-
{ n: { id: "2" } },
|
|
116
|
-
// NULL first in ASC
|
|
117
|
-
{ n: { id: "3" } },
|
|
118
|
-
// Alpha
|
|
119
|
-
{ n: { id: "1" } }
|
|
120
|
-
// Zebra
|
|
121
|
-
]
|
|
122
|
-
},
|
|
123
|
-
{
|
|
124
|
-
name: "List ClassDeclarations by name ascending desc",
|
|
125
|
-
description: "Neo4j-style NULL handling: In DESC order, NULLs appear last.",
|
|
126
|
-
graphFactory: () => new import_graph2.GraphBuilder().addNode((0, import_graph2.stubNode)("1", "ClassDeclaration", { name: "Zebra" })).addNode((0, import_graph2.stubNode)("2", "ClassDeclaration", {})).addNode((0, import_graph2.stubNode)("3", "ClassDeclaration", { name: "Alpha" })).build(),
|
|
127
|
-
queries: [
|
|
128
|
-
["MATCH (n:ClassDeclaration)", "ORDER BY n.name DESC", "RETURN n"]
|
|
129
|
-
],
|
|
130
|
-
results: [
|
|
131
|
-
{ n: { id: "1" } },
|
|
132
|
-
// Zebra
|
|
133
|
-
{ n: { id: "3" } },
|
|
134
|
-
// Alpha
|
|
135
|
-
{ n: { id: "2" } }
|
|
136
|
-
// NULL last in DESC
|
|
137
|
-
]
|
|
138
|
-
}
|
|
139
|
-
];
|
|
140
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
141
|
-
0 && (module.exports = {
|
|
142
|
-
ORDER_BY_FEATURES
|
|
143
|
-
});
|