Repository navigation
feat(plugin-neo4j): add a Neo4j driver over Bolt with Cypher - #3925
Merged
Merged
Conversation
Labels and relationship types in the sidebar, nodes and relationships as grid rows, and Cypher in the editor. A Bolt 4.2 to 5.4 client written on the SwiftNIO packages already in the project.
…ed write counts - Read-only and Safe Mode treat INSERT, ENABLE, DEALLOCATE and REALLOCATE as writes. - A duration whose nanoseconds overflow Int64 formats instead of trapping. - A path lists its steps in order, with each relationship pointing the way it was walked. - A row-capped statement keeps the summary from its final DISCARD, so its write counts are kept. - Rows affected counts created or deleted nodes and relationships; other counters show as a status message. - The sidebar heading reads Types for both labels and relationship types.
- A name holding \u is refused: Neo4j decodes the escape inside backticks, so it could close its quotes. - Text filters read any value as text, so a number or list no longer fails the page; labels match when one does. - Clearing case sensitivity applies to =, != and IN, and still compares numbers as numbers. - Only canonical numbers become number literals, so 012 and 20-digit ids stay text. - Filtered and exact row counts are answered, so a filtered grid has a total. - Indexes list on Neo4j 4.4 and stay with their own label or relationship type. - START, STOP, ALTER and the other admin words count as writes only before their object, so a variable named start is a read. - A cancel that lands as a capped statement ends no longer sends a DISCARD the server would reject.
# Conflicts: # apple/Packages/TableProCore/Package.swift # apple/Packages/TableProCore/Sources/TableProSQLGrammar/SQLLexicalProfile.swift # apple/TablePro/Core/Utilities/SQL/QueryClassifier.swift
… TLS setup with Kafka
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Neo4jDriverPlugin. It talks Bolt itself, on the SwiftNIO and NIOSSL packages the Kafka plugin already links, so there is no new dependency. The handshake offers Bolt 5.4 down to 5.0, then 4.4 down to 4.2.TableProNeo4jCoreholds the parts that need no socket: PackStream (nesting capped at 64 levels), Bolt messages and chunking, value text, the Cypher the grid sends, and the rows it gets back.Plugins/SharedNIO/PluginNIOChannel.swift: the cancellable NIO connect, the TLS context and the connect error text, shared by Kafka and Neo4j instead of copied.SHOW DATABASES, with Labels and Relationship Types inside, as the plugin's schemas. A user refused access tosystemstill gets the database they connected to.<id>,<labels>and one column per property; a relationship type shows<id>,<start>,<end>and its properties. Sort and every filter operator become Cypher. A<labels>filter matches when any label does, BETWEEN reads both bounds, REGEX reads the value as text. Read-only in this PR.$1,$2for the host's parameters. The row cap pulls cap + 1 records and discards the rest on the server..neo4jis inenginesWithProvenReads), so the server refuses a write the classifier missed.\uXXXXescapes are decoded before tiering, and aDELETEwith noWHERE,LIMITor property map gets the dangerous-query confirmation.CREATE,MERGE,SET,REMOVE,DELETE,FOREACHand a procedure not known to read are writes,DROPis destructive,LOAD CSVreaches outside the database.withoutDashCommentsfact for Cypher, so(a)-- (b)stays code and the;after it still splits.neo4j,neo4j+s,neo4j+ssc,bolt,bolt+sandbolt+sscwork:+ssets Verify Identity,+sscsets Required.neo4j://connects to the host it names and does not follow a cluster routing table.Docs: TableProApp/docs#142, to merge after this one.
Test plan
swift test:TableProNeo4jCoreTests(39, including BETWEEN bounds, every<labels>operator, REGEX as text, the nesting limit),TableProSQLGrammarTests(272),TableProPluginKitTests(625).TableProTests/Core/Utilities/SQL(814, including Cypher unicode escapes, the unfiltered DELETE, the--split),PluginDriverAdapterStatementContextTests,ConnectionURLParserTLSPortTests,PluginMetadataRegistryTypeCountTests,SQLLexicalFeatureMappingTests.scripts/probes/check-neo4j.shagainstneo4j:5(5.26.32), 40 checks: read mode refuses a write, a raw filter cannot write, BETWEEN and<labels>filters, a 2,500-row export in 3 batches, a queued statement cancelled while a count holds the connection, SSL Preferred against a server without TLS, and the server decoding\u0061bcoutside a string.neo4j:4.4(4.4.48): 40 checks, Bolt 4 path with numeric ids and no LOGON.Neo4jDriverPluginandKafkaDriverPluginbuilds,verify-plugin-loads.sh, R1 and R2,check-plugin-provides.py,verify.sh l10n, andverify.sh linton every changed Swift file.AllPluginslocally stops on the missing Dameng bridge library, with no Swift errors; CI builds it.Fixes #1986