Package ac.simons.neo4j.migrations.core
Interface CypherResource
public interface CypherResource
Abstraction over Cypher resources.
- Since:
- 1.8.0
- Author:
- Michael J. Simons
- Soundtrack
- Koljah - Aber der Abgrund
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic interface
Terminal step of building a resource -
Method Summary
Modifier and TypeMethodDescriptionReturns all statements that are not single line comments.The identifier for this resource must be parsable into aMigrationVersion
, seeMigrationVersion.canParse(String)
.static CypherResource
Creates a new resource for the given URL, using the default settings for autocrlf.static CypherResource
Creates a new resource for the given URL.static CypherResource.WithContent
withContent
(String content) Starts building a Cypher resource from the given content
-
Method Details
-
of
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
Creates a new resource for the given URL.- Parameters:
url
- The url to create the resource fromautocrlf
- Setting for autocrlf.- Returns:
- a new Cypher resource
-
withContent
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 aMigrationVersion
, seeMigrationVersion.canParse(String)
.- Returns:
- An identifier for this resource
-
getChecksum
String getChecksum()- Returns:
- The checksum of this resource
-
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
- Returns:
- A list of surely identifiable single line comments, either "standalone" or before a valid cypher statement
-