Commit 9fc85c4
committed
feat(neo4j): namespace labels, lossless projection, and a driver-free Bolt seam (#154)
Brings the Java Neo4j backend to parity with the Python/TypeScript siblings and
makes it a lossless projection of the IR.
Namespacing (so a Java graph can share a Neo4j DB with Py*/TS* graphs):
- all node labels J-prefixed, all relationship types J_-prefixed, constraint/index
names j_-prefixed.
- provenance property renamed _unit -> _module (matches the siblings).
- --emit schema now writes schema.neo4j.json (matches the checked-in contract);
release asset + README updated.
- NEO4J_URI/USERNAME/PASSWORD/DATABASE env-var fallback (flag > env > default).
Lossless projection (every Lombok entity field is represented):
- new first-class nodes :JInitializationBlock, :JCrudOperation, :JCrudQuery,
:JComment, with J_HAS_INIT_BLOCK / J_HAS_CRUD_OPERATION / J_HAS_CRUD_QUERY /
J_HAS_COMMENT and J_HAS_CALLSITE/J_DECLARES_VAR extended to init blocks.
- added scalar props: is_modified, file_path (callable), variable_initializers_json,
default_value, argument_expr, is_unspecified, start/end_column on params & vars,
docstrings, and source_kind/destination_kind on J_CALLS.
- CypherWriter.DESCENDANTS extended so the scoped wipe / orphan prune reach the new
containment edges.
Packaging seam (lets the GraalVM native image prune the driver):
- BoltConfig + BoltSink extracted as driver-free core types; BoltWriter is the only
class importing org.neo4j.driver.* and is loaded reflectively by Neo4jEmitter, so
the fat jar bundles the driver (live Bolt push works) while native-image, which
never statically references it, falls back to writing graph.cypher.
Schema contract regenerated (16 node labels, 20 relationship types, 15 constraints);
conformance test updated; neo4j-schema.drawio refreshed to the J-prefixed schema
with the call graph (J_CALLS / J_RESOLVES_TO) drawn explicitly.1 parent 47ca72f commit 9fc85c4
18 files changed
Lines changed: 816 additions & 365 deletions
File tree
- .github/workflows
- src
- main/java/com/ibm/cldk
- neo4j
- test/java/com/ibm/cldk/neo4j
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
52 | 52 | | |
53 | 53 | | |
54 | 54 | | |
55 | | - | |
| 55 | + | |
56 | 56 | | |
57 | 57 | | |
58 | 58 | | |
| |||
88 | 88 | | |
89 | 89 | | |
90 | 90 | | |
91 | | - | |
| 91 | + | |
92 | 92 | | |
93 | 93 | | |
94 | 94 | | |
| |||
101 | 101 | | |
102 | 102 | | |
103 | 103 | | |
104 | | - | |
| 104 | + | |
105 | 105 | | |
106 | 106 | | |
107 | 107 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
105 | 105 | | |
106 | 106 | | |
107 | 107 | | |
108 | | - | |
| 108 | + | |
109 | 109 | | |
110 | 110 | | |
111 | 111 | | |
112 | | - | |
113 | | - | |
| 112 | + | |
| 113 | + | |
114 | 114 | | |
115 | 115 | | |
116 | | - | |
117 | | - | |
118 | | - | |
119 | | - | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
120 | 122 | | |
121 | 123 | | |
122 | 124 | | |
| |||
188 | 190 | | |
189 | 191 | | |
190 | 192 | | |
191 | | - | |
192 | | - | |
193 | | - | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
194 | 200 | | |
195 | 201 | | |
196 | 202 | | |
197 | | - | |
198 | | - | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
199 | 207 | | |
200 | 208 | | |
201 | 209 | | |
| |||
223 | 231 | | |
224 | 232 | | |
225 | 233 | | |
226 | | - | |
| 234 | + | |
227 | 235 | | |
228 | 236 | | |
229 | 237 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
125 | 125 | | |
126 | 126 | | |
127 | 127 | | |
128 | | - | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
129 | 132 | | |
130 | 133 | | |
131 | 134 | | |
| |||
0 commit comments