public class SqlScript extends Object
Modifier and Type | Field and Description |
---|---|
private String |
algorithm |
private String |
checksum |
private static String |
DEFAULT_HASH_ALGORITHM |
static Pattern |
FILENAME_PATTERN |
private static CharFilter |
FILTER_REGULAR |
private static char[] |
HEX |
private DataResource |
resource |
private List<String> |
statements |
private static Charset |
UTF8 |
private int |
version |
Modifier | Constructor and Description |
---|---|
private |
SqlScript(DataResource resource,
int version,
String algorithm)
The constructor.
|
Modifier and Type | Method and Description |
---|---|
static SqlScript |
create(DataResource resource) |
static SqlScript |
create(DataResource resource,
String algorithm) |
String |
getChecksum() |
private static String |
getHex(byte[] data) |
String |
getSourceFilename() |
String |
getSourcePath() |
List<String> |
getStatements()
The actual SQL statements.
ATTENTION: All continuous lines ending with a colon (after stripping comments and trimming) are grouped as one statement. |
private void |
init()
Lazy initialization.
|
public static final Pattern FILENAME_PATTERN
private static final String DEFAULT_HASH_ALGORITHM
private static final CharFilter FILTER_REGULAR
private static final char[] HEX
private static final Charset UTF8
private final DataResource resource
private final int version
private final String algorithm
private String checksum
private SqlScript(DataResource resource, int version, String algorithm)
public String getSourcePath()
SQL file
.public String getSourceFilename()
private void init()
public String getChecksum()
SQL file
after normalization (EOL-style normalized to LF,
comments removed, lines trimmed)public List<String> getStatements()
public static SqlScript create(DataResource resource)
public static SqlScript create(DataResource resource, String algorithm)
private static String getHex(byte[] data)
Copyright © 2001–2016 mmm-Team. All rights reserved.