Interface CypherResource


public interface CypherResource
Abstraction over Cypher resources.
Since:
1.8.0
Author:
Michael J. Simons
Soundtrack
Koljah - Aber der Abgrund
  • Method Details

    • of

      static CypherResource of(URL url)
      Creates a new resource for the given URL, using the default settings for autocrlf.
      Parameters:
      url - The url to create the resource from
      Returns:
      a new Cypher resource
    • of

      static CypherResource of(URL url, boolean autocrlf)
      Creates a new resource for the given URL.
      Parameters:
      url - The url to create the resource from
      autocrlf - Setting for autocrlf.
      Returns:
      a new Cypher resource
    • withContent

      static CypherResource.WithContent withContent(String content)
      Starts building a Cypher resource from the given content
      Parameters:
      content - The string containing cypher
      Returns:
      first step of building the resource
      Since:
      1.8.0
    • getIdentifier

      String getIdentifier()
      The identifier for this resource must be parsable into a MigrationVersion, see MigrationVersion.canParse(String).
      Returns:
      An identifier for this resource
    • getChecksum

      String getChecksum()
      Returns:
      The checksum of this resource
    • getExecutableStatements

      List<String> getExecutableStatements()
      Returns all statements that are not single line comments. The list of statements might contain :use database statements, which neo4j-migrations (browser and cypher-shell) can deal with but the pure driver can't.

      The returned list will never include single line comments, but the statements themselves might contain comments.

      Returns:
      A list of executable statements
    • getSingleLineComments

      List<String> getSingleLineComments()
      Returns:
      A list of surely identifiable single line comments, either "standalone" or before a valid cypher statement