Skip to content

Instantly share code, notes, and snippets.

@Pablissimo
Pablissimo / craft.js
Created August 5, 2019 09:03
A quick command-line Node app to look at the Neo4j Minecraft database and figure out how to make any item in it
// We take a dependency on the neo4j-driver module for the connection to the database
const neo4j = require('neo4j-driver').v1;
// And we'll need a driver to connect to the database. We'll disable 'lossless integers'
// because sodding about with the Neo4j integer type to do node lookups is a pain, and
// our graph doesn't have anywhere near enough nodes to worry about blowing through 53
// bits of integer precision
const driver = neo4j.driver
(
'bolt://localhost:7687', // Default setup for Neo4j Desktop
@Pablissimo
Pablissimo / out.txt
Created August 8, 2019 11:20
Example output of a cypher-shell call with --format verbose for SO question https://stackoverflow.com/questions/56899593/redirect-neo4j-profiling-output-to-file
+---+
| n |
+---+
+---+
+----------------------------------------------------------------------+| Plan | Statement | Version | Planner | Runtime | Time |+----------------------------------------------------------------------+| "EXPLAIN" | "READ_ONLY" | "CYPHER 3.5" | "COST" | "COMPILED" | 1 |+----------------------------------------------------------------------+
+------------------+----------------+-------------+-------+
| Operator | Estimated Rows | Identifiers | Other |
+------------------+----------------+-------------+-------+