@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.
Files changed (155) hide show
  1. package/bin/cli.js +2463 -0
  2. package/lib.js +2430 -0
  3. package/package.json +26 -7
  4. package/apps/code-graph/src/main.js +0 -50
  5. package/libs/cli/code-graph/src/index.js +0 -39
  6. package/libs/cli/code-graph/src/lib/class-declarations/abstractions/service.js +0 -72
  7. package/libs/cli/code-graph/src/lib/class-declarations/abstractions/service.stateful.js +0 -68
  8. package/libs/cli/code-graph/src/lib/class-declarations/class-declarations.doc.js +0 -147
  9. package/libs/cli/code-graph/src/lib/class-declarations/class-declarations.graph.js +0 -55
  10. package/libs/cli/code-graph/src/lib/class-declarations/index.js +0 -27
  11. package/libs/cli/code-graph/src/lib/code.graph.factory.js +0 -63
  12. package/libs/cli/code-graph/src/lib/code.graph.js +0 -62
  13. package/libs/cli/code-graph/src/lib/core/core.js +0 -58
  14. package/libs/cli/code-graph/src/lib/core.js +0 -85
  15. package/libs/cli/code-graph/src/lib/decorators/index.js +0 -36
  16. package/libs/cli/code-graph/src/lib/docs/index.js +0 -21
  17. package/libs/cli/code-graph/src/lib/docs/specs.js +0 -36
  18. package/libs/cli/code-graph/src/lib/expressions/call-expressions.graph.js +0 -28
  19. package/libs/cli/code-graph/src/lib/fixtures/reactive-event-bus/src/app/examples.event-bus.js +0 -53
  20. package/libs/cli/code-graph/src/lib/method-declarations/index.js +0 -23
  21. package/libs/cli/code-graph/src/lib/method-declarations/method-declarations.doc.js +0 -106
  22. package/libs/cli/code-graph/src/lib/method-declarations/method-declarations.graph.js +0 -56
  23. package/libs/cli/code-graph/src/lib/parameters/index.js +0 -42
  24. package/libs/cli/code-graph/src/lib/property-declarations/abstractions/reactive-state.evals.js +0 -139
  25. package/libs/cli/code-graph/src/lib/property-declarations/abstractions/reactive-state.js +0 -104
  26. package/libs/cli/code-graph/src/lib/property-declarations/index.js +0 -25
  27. package/libs/cli/code-graph/src/lib/property-declarations/property-declarations.doc.js +0 -74
  28. package/libs/cli/code-graph/src/lib/property-declarations/property-declarations.graph.js +0 -43
  29. package/libs/cli/code-graph/src/lib/tools/index.js +0 -34
  30. package/libs/cli/code-graph/src/lib/tools/match-code-graph.tool.js +0 -64
  31. package/libs/cli/code-graph/src/lib/types/index.js +0 -99
  32. package/libs/cli/code-graph/src/lib/v2/extractors/extractor.doc.js +0 -345
  33. package/libs/cli/code-graph/src/lib/v2/extractors/extractor.js +0 -52
  34. package/libs/cli/code-graph/src/lib/v2/extractors/index.js +0 -23
  35. package/libs/cli/code-graph/src/lib/v2/graph-builder/code-graph.builder.js +0 -76
  36. package/libs/cli/code-graph/src/lib/v2/graph-builder/index.js +0 -21
  37. package/libs/cli/code-graph/src/lib/v2/graph-builder/node.processor.js +0 -48
  38. package/libs/cli/code-graph/src/lib/v2/graph-builder/relationship.processor.js +0 -79
  39. package/libs/cli/code-graph/src/lib/v2/graph-builder/type.processor.js +0 -45
  40. package/libs/cli/code-graph/src/lib/v2/index.js +0 -37
  41. package/libs/cli/code-graph/src/lib/v2/tools/build-code-graph.doc.js +0 -220
  42. package/libs/cli/code-graph/src/lib/v2/tools/build-code-graph.tool.js +0 -42
  43. package/libs/cli/cypher/src/index.js +0 -25
  44. package/libs/cli/cypher/src/lib/docs/features/advanced-optional-match.feature.js +0 -277
  45. package/libs/cli/cypher/src/lib/docs/features/anonymous-relationship.feature.js +0 -69
  46. package/libs/cli/cypher/src/lib/docs/features/anonymous-variable-length.feature.js +0 -105
  47. package/libs/cli/cypher/src/lib/docs/features/basic-filtering.feature.js +0 -70
  48. package/libs/cli/cypher/src/lib/docs/features/basic-optional-match.feature.js +0 -99
  49. package/libs/cli/cypher/src/lib/docs/features/basic-relationship.feature.js +0 -125
  50. package/libs/cli/cypher/src/lib/docs/features/index.js +0 -51
  51. package/libs/cli/cypher/src/lib/docs/features/limit.feature.js +0 -50
  52. package/libs/cli/cypher/src/lib/docs/features/match-nodes.feature.js +0 -106
  53. package/libs/cli/cypher/src/lib/docs/features/multiple-relationship-types.feature.js +0 -105
  54. package/libs/cli/cypher/src/lib/docs/features/order-by.feature.js +0 -143
  55. package/libs/cli/cypher/src/lib/docs/features/property-matching.feature.js +0 -152
  56. package/libs/cli/cypher/src/lib/docs/features/relationship-without-variable.feature.js +0 -48
  57. package/libs/cli/cypher/src/lib/docs/features/return-statement.feature.js +0 -65
  58. package/libs/cli/cypher/src/lib/docs/features/unidirected-relationship.feature.js +0 -82
  59. package/libs/cli/cypher/src/lib/docs/features/variable-length-path.feature.js +0 -136
  60. package/libs/cli/cypher/src/lib/docs/features/where-conditional.feature.js +0 -187
  61. package/libs/cli/cypher/src/lib/docs/features/where-operators.feature.js +0 -302
  62. package/libs/cli/cypher/src/lib/docs/prompts.js +0 -36
  63. package/libs/cli/cypher/src/lib/docs/specs.js +0 -181
  64. package/libs/cli/cypher/src/lib/executor/condition-evaluator.js +0 -158
  65. package/libs/cli/cypher/src/lib/executor/executor.js +0 -83
  66. package/libs/cli/cypher/src/lib/executor/graph.js +0 -15
  67. package/libs/cli/cypher/src/lib/executor/match-engine.js +0 -153
  68. package/libs/cli/cypher/src/lib/executor/pattern-matcher.js +0 -109
  69. package/libs/cli/cypher/src/lib/executor/relationship-navigator.js +0 -64
  70. package/libs/cli/cypher/src/lib/executor/result-formatter.js +0 -143
  71. package/libs/cli/cypher/src/lib/executor/traverse-engine.js +0 -164
  72. package/libs/cli/cypher/src/lib/executor/utils.js +0 -37
  73. package/libs/cli/cypher/src/lib/graph.stub.js +0 -63
  74. package/libs/cli/cypher/src/lib/index.js +0 -74
  75. package/libs/cli/cypher/src/lib/lexer.js +0 -398
  76. package/libs/cli/cypher/src/lib/parser.js +0 -602
  77. package/libs/cli/cypher/src/lib/validator/query-validator.js +0 -95
  78. package/libs/cli/cypher/src/lib/validator/supported-features.config.js +0 -111
  79. package/libs/cli/cypher/src/lib/validator/unsupported-features.config.js +0 -150
  80. package/libs/cli/shared/src/index.js +0 -53
  81. package/libs/cli/shared/src/lib/admin-token.js +0 -121
  82. package/libs/cli/shared/src/lib/config.js +0 -49
  83. package/libs/cli/shared/src/lib/consts.js +0 -57
  84. package/libs/cli/shared/src/lib/core.js +0 -46
  85. package/libs/cli/shared/src/lib/infrastructure/cli.js +0 -47
  86. package/libs/cli/shared/src/lib/infrastructure/config.js +0 -47
  87. package/libs/cli/shared/src/lib/infrastructure/config.reporitory.js +0 -51
  88. package/libs/cli/shared/src/lib/infrastructure/formatters/console-formatter.js +0 -96
  89. package/libs/cli/shared/src/lib/infrastructure/formatters/index.js +0 -41
  90. package/libs/cli/shared/src/lib/infrastructure/formatters/json-formatter.js +0 -64
  91. package/libs/cli/shared/src/lib/infrastructure/formatters/markdown-formatter.js +0 -120
  92. package/libs/cli/shared/src/lib/infrastructure/formatters/types.js +0 -15
  93. package/libs/cli/shared/src/lib/infrastructure/formatters/utils.js +0 -72
  94. package/libs/cli/shared/src/lib/infrastructure/git.js +0 -147
  95. package/libs/cli/shared/src/lib/infrastructure/http.js +0 -257
  96. package/libs/cli/shared/src/lib/infrastructure/markdown.js +0 -95
  97. package/libs/cli/shared/src/lib/infrastructure/transformers/embeddings.js +0 -88
  98. package/libs/cli/shared/src/lib/infrastructure/transformers/index.js +0 -25
  99. package/libs/cli/shared/src/lib/infrastructure/transformers/rag-eval.js +0 -154
  100. package/libs/cli/shared/src/lib/infrastructure/transformers/similarity.js +0 -210
  101. package/libs/cli/shared/src/lib/infrastructure/workspace.js +0 -297
  102. package/libs/cli/shared/src/lib/infrastructure/yaml.js +0 -237
  103. package/libs/cli/shared/src/lib/lowgular.config.js +0 -120
  104. package/libs/cli/shared/src/lib/token.js +0 -135
  105. package/libs/cli/shared/src/lib/utils/solution.util.js +0 -35
  106. package/libs/cli/shared/src/lib/utils/utils.js +0 -89
  107. package/libs/cli/typescript/src/index.js +0 -21
  108. package/libs/cli/typescript/src/lib/base/index.js +0 -23
  109. package/libs/cli/typescript/src/lib/base/nameable.js +0 -34
  110. package/libs/cli/typescript/src/lib/base/nodeable.js +0 -36
  111. package/libs/cli/typescript/src/lib/class.implementation.js +0 -52
  112. package/libs/cli/typescript/src/lib/core/declaration.registry.js +0 -107
  113. package/libs/cli/typescript/src/lib/core/design-pattern.js +0 -55
  114. package/libs/cli/typescript/src/lib/core/index.js +0 -35
  115. package/libs/cli/typescript/src/lib/core/navigable-declaration.js +0 -69
  116. package/libs/cli/typescript/src/lib/core/program-context.js +0 -71
  117. package/libs/cli/typescript/src/lib/core/syntax-kind.utils.js +0 -40
  118. package/libs/cli/typescript/src/lib/core/type.js +0 -374
  119. package/libs/cli/typescript/src/lib/declaration.abstraction.js +0 -90
  120. package/libs/cli/typescript/src/lib/decorator.implementation.js +0 -35
  121. package/libs/cli/typescript/src/lib/enum.implementation.js +0 -35
  122. package/libs/cli/typescript/src/lib/function-declaration.implementation.js +0 -35
  123. package/libs/cli/typescript/src/lib/index.js +0 -57
  124. package/libs/cli/typescript/src/lib/interface.implementation.js +0 -51
  125. package/libs/cli/typescript/src/lib/members/method-abstraction.resolver.js +0 -90
  126. package/libs/cli/typescript/src/lib/members/method-declaration.implementation.js +0 -44
  127. package/libs/cli/typescript/src/lib/members/method-signature.implementation.js +0 -46
  128. package/libs/cli/typescript/src/lib/members/method.util.js +0 -32
  129. package/libs/cli/typescript/src/lib/members/parameter.implementation.js +0 -38
  130. package/libs/cli/typescript/src/lib/members/property-declaration.implementation.js +0 -64
  131. package/libs/cli/typescript/src/lib/members/property-signature.implementation.js +0 -34
  132. package/libs/cli/typescript/src/lib/members/property.util.js +0 -61
  133. package/libs/cli/typescript/src/lib/members/statements/expressions/binary-expression.implementation.js +0 -42
  134. package/libs/cli/typescript/src/lib/members/statements/expressions/call-expression.implementation.js +0 -114
  135. package/libs/cli/typescript/src/lib/members/statements/expressions/expression.abstraction.js +0 -188
  136. package/libs/cli/typescript/src/lib/members/statements/expressions/property-access-expression.implementation.js +0 -35
  137. package/libs/cli/typescript/src/lib/members/statements/expressions/unary-expression.implementation.js +0 -51
  138. package/libs/cli/typescript/src/lib/members/statements/statement.implementation.js +0 -49
  139. package/libs/cli/typescript/src/lib/members/statements/utils.js +0 -51
  140. package/libs/cli/typescript/src/lib/plugins/built-in.plugin.js +0 -258
  141. package/libs/cli/typescript/src/lib/plugins/plugin.interface.js +0 -15
  142. package/libs/cli/typescript/src/lib/plugins/rxjs.plugin.js +0 -228
  143. package/libs/cli/typescript/src/lib/plugins/signal.plugin.js +0 -126
  144. package/libs/cli/typescript/src/lib/plugins/stubs.js +0 -66
  145. package/libs/cli/typescript/src/lib/type-alias.implementation.js +0 -72
  146. package/libs/cli/typescript/src/lib/utils.js +0 -39
  147. package/libs/cli/typescript/src/lib/variable-declaration.implementation.js +0 -35
  148. package/libs/core/codegular/src/index.js +0 -21
  149. package/libs/core/codegular/src/lib/index.js +0 -29
  150. package/libs/core/codegular/src/lib/node.js +0 -112
  151. package/libs/core/codegular/src/lib/program.js +0 -92
  152. package/libs/core/codegular/src/lib/string.js +0 -168
  153. package/libs/core/codegular/src/lib/type-checker.js +0 -170
  154. package/libs/core/codegular/src/lib/utils.js +0 -347
  155. package/main.js +0 -43
@@ -1,69 +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 anonymous_relationship_feature_exports = {};
19
- __export(anonymous_relationship_feature_exports, {
20
- ANONYMOUS_RELATIONSHIP_FEATURES: () => ANONYMOUS_RELATIONSHIP_FEATURES
21
- });
22
- module.exports = __toCommonJS(anonymous_relationship_feature_exports);
23
- var import_graph2 = require("../../graph.stub");
24
- const ANONYMOUS_RELATIONSHIP_FEATURES = [
25
- {
26
- name: "Match any relationship type",
27
- description: "Empty relationship type specification [] matches any relationship type.",
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", "ANY_TYPE")).build(),
29
- queries: [["MATCH (a:A)-[]->(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 different relationship types",
43
- description: "Empty relationship type matches relationships of any type, including different types in the same graph.",
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", "R1")).addNode((0, import_graph2.stubNode)("3", "A")).addNode((0, import_graph2.stubNode)("4", "B")).addEdge((0, import_graph2.stubEdge)("3", "4", "R2")).build(),
45
- queries: [["MATCH (a:A)-[]->(b:B)", "RETURN a, b"]],
46
- results: [
47
- {
48
- a: {
49
- id: "1"
50
- },
51
- b: {
52
- id: "2"
53
- }
54
- },
55
- {
56
- a: {
57
- id: "3"
58
- },
59
- b: {
60
- id: "4"
61
- }
62
- }
63
- ]
64
- }
65
- ];
66
- // Annotate the CommonJS export names for ESM import in node:
67
- 0 && (module.exports = {
68
- ANONYMOUS_RELATIONSHIP_FEATURES
69
- });
@@ -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 anonymous_variable_length_feature_exports = {};
19
- __export(anonymous_variable_length_feature_exports, {
20
- ANONYMOUS_VARIABLE_LENGTH_FEATURES: () => ANONYMOUS_VARIABLE_LENGTH_FEATURES
21
- });
22
- module.exports = __toCommonJS(anonymous_variable_length_feature_exports);
23
- var import_graph2 = require("../../graph.stub");
24
- const ANONYMOUS_VARIABLE_LENGTH_FEATURES = [
25
- {
26
- name: "Match any relationship type with variable length",
27
- description: "Anonymous variable-length paths [*] match paths of any relationship type with zero or more edges.",
28
- 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", "R1")).addEdge((0, import_graph2.stubEdge)("2", "3", "R2")).build(),
29
- queries: [["MATCH (a:A)-[*]->(b:B)", "RETURN a, b"]],
30
- results: [
31
- {
32
- a: {
33
- id: "1"
34
- },
35
- b: {
36
- id: "3"
37
- }
38
- }
39
- ]
40
- },
41
- {
42
- name: "Match pattern with anonymous variable-length at edges and specific type in middle",
43
- description: "Variable-length paths can mix anonymous types [*] with specific types in complex patterns.",
44
- graphFactory: () => new import_graph2.GraphBuilder().addNode((0, import_graph2.stubNode)("1", "A")).addNode((0, import_graph2.stubNode)("2", "B")).addNode((0, import_graph2.stubNode)("3", "C")).addNode((0, import_graph2.stubNode)("4", "D")).addEdge((0, import_graph2.stubEdge)("1", "2", "R1")).addEdge((0, import_graph2.stubEdge)("2", "3", "R2")).addEdge((0, import_graph2.stubEdge)("3", "4", "R3")).build(),
45
- queries: [
46
- ["MATCH (a:A)-[*]->(b:B)-[:R2*]->(c:C)-[*]->(d:D)", "RETURN a, b, c, d"]
47
- ],
48
- results: [
49
- {
50
- a: {
51
- id: "1"
52
- },
53
- b: {
54
- id: "2"
55
- },
56
- c: {
57
- id: "3"
58
- },
59
- d: {
60
- id: "4"
61
- }
62
- }
63
- ]
64
- },
65
- {
66
- name: "Match zero-length path (same node) with anonymous variable-length",
67
- description: "Anonymous variable-length paths support zero-length paths when source and target are different nodes (no path).",
68
- graphFactory: () => new import_graph2.GraphBuilder().addNode((0, import_graph2.stubNode)("1", "A")).addNode((0, import_graph2.stubNode)("2", "B")).build(),
69
- queries: [["MATCH (a:A)-[*]->(b:B)", "RETURN a, b"]],
70
- results: []
71
- },
72
- {
73
- name: "Match zero-length path when source and target are same node",
74
- description: "Anonymous variable-length paths match zero-length paths when source and target variables refer to the same node.",
75
- graphFactory: () => new import_graph2.GraphBuilder().addNode((0, import_graph2.stubNode)("1", "A")).build(),
76
- queries: [["MATCH (a:A)-[*]->(a:A)", "RETURN a"]],
77
- results: [
78
- {
79
- a: {
80
- id: "1"
81
- }
82
- }
83
- ]
84
- },
85
- {
86
- name: "Traverse multiple hops with different relationship types",
87
- description: "Anonymous variable-length paths can traverse multiple hops with different relationship types.",
88
- graphFactory: () => new import_graph2.GraphBuilder().addNode((0, import_graph2.stubNode)("1", "A")).addNode((0, import_graph2.stubNode)("2", "X")).addNode((0, import_graph2.stubNode)("3", "Y")).addNode((0, import_graph2.stubNode)("4", "B")).addEdge((0, import_graph2.stubEdge)("1", "2", "TYPE1")).addEdge((0, import_graph2.stubEdge)("2", "3", "TYPE2")).addEdge((0, import_graph2.stubEdge)("3", "4", "TYPE3")).build(),
89
- queries: [["MATCH (a:A)-[*]->(b:B)", "RETURN a, b"]],
90
- results: [
91
- {
92
- a: {
93
- id: "1"
94
- },
95
- b: {
96
- id: "4"
97
- }
98
- }
99
- ]
100
- }
101
- ];
102
- // Annotate the CommonJS export names for ESM import in node:
103
- 0 && (module.exports = {
104
- ANONYMOUS_VARIABLE_LENGTH_FEATURES
105
- });
@@ -1,70 +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_filtering_feature_exports = {};
19
- __export(basic_filtering_feature_exports, {
20
- BASIC_FILTERING_FEATURES: () => BASIC_FILTERING_FEATURES
21
- });
22
- module.exports = __toCommonJS(basic_filtering_feature_exports);
23
- var import_graph2 = require("../../graph.stub");
24
- const BASIC_FILTERING_FEATURES = [
25
- {
26
- name: "Filter single node with property in pattern",
27
- description: "Filter nodes by property directly in the MATCH pattern. Equivalent to using WHERE clause.",
28
- graphFactory: () => new import_graph2.GraphBuilder().addNode((0, import_graph2.stubNode)("1")).addNode((0, import_graph2.stubNode)("2")).addNode((0, import_graph2.stubNode)("3")).build(),
29
- queries: [
30
- ['MATCH (a:A {id: "1"})', "RETURN a"],
31
- ["MATCH (a:A)", 'WHERE a.id = "1"', "RETURN a"]
32
- ],
33
- results: [
34
- {
35
- a: {
36
- id: "1"
37
- }
38
- }
39
- ]
40
- },
41
- {
42
- name: "Filter multiple nodes with properties in pattern",
43
- description: "Filter multiple nodes by properties directly in the MATCH pattern.",
44
- graphFactory: () => new import_graph2.GraphBuilder().addNode((0, import_graph2.stubNode)("1", "A")).addNode((0, import_graph2.stubNode)("2", "B")).addNode((0, import_graph2.stubNode)("3", "A")).addNode((0, import_graph2.stubNode)("4", "B")).build(),
45
- queries: [
46
- ['MATCH (a:A {id: "1"}), (b:B {id: "2"})', "RETURN a, b"],
47
- ['MATCH (a:A {id: "1"}), (b:B)', 'WHERE b.id = "2"', "RETURN a, b"],
48
- [
49
- "MATCH (a:A)",
50
- "MATCH (b:B)",
51
- 'WHERE a.id = "1" AND b.id = "2"',
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
- // Annotate the CommonJS export names for ESM import in node:
68
- 0 && (module.exports = {
69
- BASIC_FILTERING_FEATURES
70
- });
@@ -1,99 +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_optional_match_feature_exports = {};
19
- __export(basic_optional_match_feature_exports, {
20
- BASIC_OPTIONAL_MATCH_FEATURES: () => BASIC_OPTIONAL_MATCH_FEATURES
21
- });
22
- module.exports = __toCommonJS(basic_optional_match_feature_exports);
23
- var import_graph2 = require("../../graph.stub");
24
- const BASIC_OPTIONAL_MATCH_FEATURES = [
25
- {
26
- name: "Left outer join - all required nodes preserved",
27
- description: "OPTIONAL MATCH performs a left outer join. All required MATCH results are preserved, even if optional matches fail.",
28
- graphFactory: () => new import_graph2.GraphBuilder().addNode((0, import_graph2.stubNode)("1", "A")).addNode((0, import_graph2.stubNode)("2", "A")).addNode((0, import_graph2.stubNode)("3", "B")).addEdge((0, import_graph2.stubEdge)("1", "3", "R1")).build(),
29
- queries: [
30
- ["MATCH (a:A)", "OPTIONAL MATCH (a)-[:R1]->(b:B)", "RETURN a, b"]
31
- ],
32
- results: [
33
- {
34
- a: {
35
- id: "1"
36
- },
37
- b: {
38
- id: "3"
39
- }
40
- },
41
- {
42
- a: {
43
- id: "2"
44
- },
45
- b: null
46
- }
47
- ]
48
- },
49
- {
50
- name: "Optional variable set to null when no match exists",
51
- description: "When an optional match fails, the optional variable is set to null in the result.",
52
- 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")).addNode((0, import_graph2.stubNode)("3", "A")).build(),
53
- queries: [
54
- ["MATCH (a:A)", "OPTIONAL MATCH (a)-[:R1]->(b:B)", "RETURN a, b"]
55
- ],
56
- results: [
57
- {
58
- a: {
59
- id: "1"
60
- },
61
- b: {
62
- id: "2"
63
- }
64
- },
65
- {
66
- a: {
67
- id: "3"
68
- },
69
- b: null
70
- }
71
- ]
72
- },
73
- {
74
- name: "Set optional variable to null when no match exists",
75
- description: "When all optional matches fail (no connections exist), all optional variables are set to null for all required matches.",
76
- graphFactory: () => new import_graph2.GraphBuilder().addNode((0, import_graph2.stubNode)("1", "A")).addNode((0, import_graph2.stubNode)("2", "A")).build(),
77
- queries: [
78
- ["MATCH (a:A)", "OPTIONAL MATCH (a)-[:R1]->(b:B)", "RETURN a, b"]
79
- ],
80
- results: [
81
- {
82
- a: {
83
- id: "1"
84
- },
85
- b: null
86
- },
87
- {
88
- a: {
89
- id: "2"
90
- },
91
- b: null
92
- }
93
- ]
94
- }
95
- ];
96
- // Annotate the CommonJS export names for ESM import in node:
97
- 0 && (module.exports = {
98
- BASIC_OPTIONAL_MATCH_FEATURES
99
- });
@@ -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
- });