@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,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
- });
@@ -1,152 +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 property_matching_feature_exports = {};
19
- __export(property_matching_feature_exports, {
20
- PROPERTY_MATCHING_FEATURES: () => PROPERTY_MATCHING_FEATURES
21
- });
22
- module.exports = __toCommonJS(property_matching_feature_exports);
23
- var import_graph2 = require("../../graph.stub");
24
- const PROPERTY_MATCHING_FEATURES = [
25
- {
26
- name: "Match node with single property",
27
- description: "Filter nodes by a single property value in the pattern. Properties are matched exactly.",
28
- graphFactory: () => new import_graph2.GraphBuilder().addNode((0, import_graph2.stubNode)("1", "A", { id: "1" })).addNode((0, import_graph2.stubNode)("2", "A", { id: "2" })).build(),
29
- queries: [['MATCH (n:A {id: "1"})', "RETURN n"]],
30
- results: [
31
- {
32
- n: {
33
- id: "1"
34
- }
35
- }
36
- ]
37
- },
38
- {
39
- name: "Match node with number property",
40
- description: "Properties can be numbers (integers or floats).",
41
- graphFactory: () => new import_graph2.GraphBuilder().addNode((0, import_graph2.stubNode)("1", "A", { count: 42 })).addNode((0, import_graph2.stubNode)("2", "A", { count: 10 })).build(),
42
- queries: [["MATCH (n:A {count: 42})", "RETURN n"]],
43
- results: [
44
- {
45
- n: {
46
- id: "1"
47
- }
48
- }
49
- ]
50
- },
51
- {
52
- name: "Match node with boolean property",
53
- description: "Properties can be boolean values (true/false).",
54
- graphFactory: () => new import_graph2.GraphBuilder().addNode((0, import_graph2.stubNode)("1", "A", { active: true })).addNode((0, import_graph2.stubNode)("2", "A", { active: false })).build(),
55
- queries: [["MATCH (n:A {active: true})", "RETURN n"]],
56
- results: [
57
- {
58
- n: {
59
- id: "1"
60
- }
61
- }
62
- ]
63
- },
64
- {
65
- name: "Match node with multiple properties",
66
- description: "Filter nodes by multiple property values. All properties must match exactly.",
67
- graphFactory: () => new import_graph2.GraphBuilder().addNode((0, import_graph2.stubNode)("1", "A", { count: 5 })).addNode((0, import_graph2.stubNode)("2", "A", { count: 5 })).addNode((0, import_graph2.stubNode)("3", "A", { count: 3 })).build(),
68
- queries: [['MATCH (n:A {id: "1", count: 5})', "RETURN n"]],
69
- results: [
70
- {
71
- n: {
72
- id: "1"
73
- }
74
- }
75
- ]
76
- },
77
- {
78
- name: "Match node with empty property map",
79
- description: "Empty property map `{}` matches all nodes with the specified label, regardless of their properties.",
80
- graphFactory: () => new import_graph2.GraphBuilder().addNode((0, import_graph2.stubNode)("1", "A")).addNode((0, import_graph2.stubNode)("2", "A")).build(),
81
- queries: [["MATCH (n:A {})", "RETURN n"]],
82
- results: [
83
- {
84
- n: {
85
- id: "1"
86
- }
87
- },
88
- {
89
- n: {
90
- id: "2"
91
- }
92
- }
93
- ]
94
- },
95
- {
96
- name: "Match node with array property",
97
- description: "Properties can be arrays. Arrays are matched exactly (same elements in same order).",
98
- graphFactory: () => new import_graph2.GraphBuilder().addNode((0, import_graph2.stubNode)("1", "A", { tags: ["a", "b"] })).addNode((0, import_graph2.stubNode)("2", "A", { tags: ["a"] })).addNode((0, import_graph2.stubNode)("3", "A", { tags: ["a", "b", "c"] })).build(),
99
- queries: [['MATCH (n:A {tags: ["a", "b"]})', "RETURN n"]],
100
- results: [
101
- {
102
- n: {
103
- id: "1"
104
- }
105
- }
106
- ]
107
- },
108
- {
109
- name: "Match node with array of numbers property",
110
- description: "Array properties can contain numbers.",
111
- graphFactory: () => new import_graph2.GraphBuilder().addNode((0, import_graph2.stubNode)("1", "A", { tags: [1, 2, 3] })).addNode((0, import_graph2.stubNode)("2", "A", { tags: [1, 2] })).build(),
112
- queries: [["MATCH (n:A {tags: [1, 2, 3]})", "RETURN n"]],
113
- results: [
114
- {
115
- n: {
116
- id: "1"
117
- }
118
- }
119
- ]
120
- },
121
- {
122
- name: "Match node with mixed property types including array",
123
- description: "Multiple properties of different types (boolean, array, etc.) can be combined in a single pattern.",
124
- graphFactory: () => new import_graph2.GraphBuilder().addNode((0, import_graph2.stubNode)("1", "A", { active: true, tags: ["a"] })).addNode((0, import_graph2.stubNode)("2", "A", { active: true, tags: ["b"] })).addNode((0, import_graph2.stubNode)("3", "A", { active: false, tags: ["a"] })).build(),
125
- queries: [['MATCH (n:A {active: true, tags: ["a"]})', "RETURN n"]],
126
- results: [
127
- {
128
- n: {
129
- id: "1"
130
- }
131
- }
132
- ]
133
- },
134
- {
135
- name: "Return empty when matching non-existent property",
136
- description: "If a property specified in the pattern does not exist on any nodes, the query returns no results.",
137
- graphFactory: () => new import_graph2.GraphBuilder().addNode((0, import_graph2.stubNode)("1", "A")).addNode((0, import_graph2.stubNode)("2", "A")).build(),
138
- queries: [['MATCH (n:A {missing: "value"})', "RETURN n"]],
139
- results: []
140
- },
141
- {
142
- name: "Return empty when one property exists but other does not",
143
- description: "All properties in the pattern must exist and match. If any property is missing, no results are returned.",
144
- graphFactory: () => new import_graph2.GraphBuilder().addNode((0, import_graph2.stubNode)("1", "A")).addNode((0, import_graph2.stubNode)("2", "A")).build(),
145
- queries: [['MATCH (n:A {id: "1", missing: "value"})', "RETURN n"]],
146
- results: []
147
- }
148
- ];
149
- // Annotate the CommonJS export names for ESM import in node:
150
- 0 && (module.exports = {
151
- PROPERTY_MATCHING_FEATURES
152
- });
@@ -1,48 +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 relationship_without_variable_feature_exports = {};
19
- __export(relationship_without_variable_feature_exports, {
20
- RELATIONSHIP_WITHOUT_VARIABLE_FEATURES: () => RELATIONSHIP_WITHOUT_VARIABLE_FEATURES
21
- });
22
- module.exports = __toCommonJS(relationship_without_variable_feature_exports);
23
- var import_graph2 = require("../../graph.stub");
24
- const RELATIONSHIP_WITHOUT_VARIABLE_FEATURES = [
25
- {
26
- name: "Not include edge in results when no variable",
27
- description: "When relationship variable is not bound (e.g., -[:TYPE]->), edge is not included in results. Only nodes are returned.",
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: [
30
- ["MATCH (a:A)-[:R1]->(b:B)", "RETURN a, b"],
31
- ["MATCH (b:B)<-[:R1]-(a:A)", "RETURN a, b"]
32
- ],
33
- results: [
34
- {
35
- a: {
36
- id: "1"
37
- },
38
- b: {
39
- id: "2"
40
- }
41
- }
42
- ]
43
- }
44
- ];
45
- // Annotate the CommonJS export names for ESM import in node:
46
- 0 && (module.exports = {
47
- RELATIONSHIP_WITHOUT_VARIABLE_FEATURES
48
- });
@@ -1,65 +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 return_statement_feature_exports = {};
19
- __export(return_statement_feature_exports, {
20
- RETURN_STATEMENT_FEATURES: () => RETURN_STATEMENT_FEATURES
21
- });
22
- module.exports = __toCommonJS(return_statement_feature_exports);
23
- var import_graph2 = require("../../graph.stub");
24
- const RETURN_STATEMENT_FEATURES = [
25
- {
26
- name: "Return all nodes",
27
- description: "The default behavior is to return all nodes.",
28
- graphFactory: () => new import_graph2.GraphBuilder().addNode((0, import_graph2.stubNode)("1")).addNode((0, import_graph2.stubNode)("2")).build(),
29
- queries: [["MATCH (n) RETURN *"]],
30
- results: [
31
- {
32
- n: {
33
- id: "1"
34
- }
35
- },
36
- {
37
- n: {
38
- id: "2"
39
- }
40
- }
41
- ]
42
- },
43
- {
44
- name: "Return aliased nodes",
45
- description: "Return aliased nodes by using the AS keyword.",
46
- graphFactory: () => new import_graph2.GraphBuilder().addNode((0, import_graph2.stubNode)("1")).addNode((0, import_graph2.stubNode)("2")).build(),
47
- queries: [["MATCH (n) RETURN n AS node"]],
48
- results: [
49
- {
50
- node: {
51
- id: "1"
52
- }
53
- },
54
- {
55
- node: {
56
- id: "2"
57
- }
58
- }
59
- ]
60
- }
61
- ];
62
- // Annotate the CommonJS export names for ESM import in node:
63
- 0 && (module.exports = {
64
- RETURN_STATEMENT_FEATURES
65
- });
@@ -1,82 +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 unidirected_relationship_feature_exports = {};
19
- __export(unidirected_relationship_feature_exports, {
20
- UNDIRECTED_RELATIONSHIP_FEATURES: () => UNDIRECTED_RELATIONSHIP_FEATURES
21
- });
22
- module.exports = __toCommonJS(unidirected_relationship_feature_exports);
23
- var import_graph2 = require("../../graph.stub");
24
- const UNDIRECTED_RELATIONSHIP_FEATURES = [
25
- {
26
- name: "Match undirected relationship (both directions)",
27
- description: "Undirected relationships match edges in either direction. Use -[:TYPE]- syntax.",
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]-(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 undirected relationship in reverse direction",
43
- description: "Undirected relationships match edges regardless of their stored direction.",
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)("2", "1", "R1")).build(),
45
- queries: [["MATCH (a:A)-[:R1]-(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: "Bind relationship variable in undirected relationship",
59
- description: "When relationship variable is bound in undirected relationship, edge object is included in results with source, target, and type.",
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", "R1")).build(),
61
- queries: [["MATCH (a:A)-[rel:R1]-(b:B)", "RETURN a, rel, b"]],
62
- results: [
63
- {
64
- a: {
65
- id: "1"
66
- },
67
- rel: {
68
- source: "1",
69
- target: "2",
70
- type: "R1"
71
- },
72
- b: {
73
- id: "2"
74
- }
75
- }
76
- ]
77
- }
78
- ];
79
- // Annotate the CommonJS export names for ESM import in node:
80
- 0 && (module.exports = {
81
- UNDIRECTED_RELATIONSHIP_FEATURES
82
- });