Skip to content

Instantly share code, notes, and snippets.

@kriswallsmith
Last active August 29, 2015 14:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kriswallsmith/4e7ea1cb1ec83f5203e1 to your computer and use it in GitHub Desktop.
Save kriswallsmith/4e7ea1cb1ec83f5203e1 to your computer and use it in GitHub Desktop.
These are the Neo4j Cypher queries Assetic would run
// what to recompile when as asset changes
MATCH (changed)<-[:INCLUDES*]-(recompile)
WHERE changed.source = "..." AND recompile.target <> NULL
RETURN recompile
// determine an asset's aggregate mtime
MATCH (root)-[:INCLUDES*]->(include)
WHERE root.source = "..."
RETURN max(collect(include.mtime) + root.mtime)
// find all referenced assets on install
MATCH (root)-[:REFERENCES*]->(ref)
WHERE root.source = "..."
RETURN ref
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment