improved sql parser.

This commit is contained in:
wenshao
2017-09-17 17:11:26 +08:00
parent b54a987cc8
commit 3c98a1eee5
23 changed files with 955 additions and 31 deletions
@@ -55,6 +55,25 @@ public final class FnvHash {
return hash;
}
public static long fnv1a_64(byte[] input, int offset, int end) {
if (input == null) {
return 0;
}
if (input.length < end) {
end = input.length;
}
long hash = BASIC;
for (int i = offset; i < end; ++i) {
byte c = input[i];
hash ^= c;
hash *= PRIME;
}
return hash;
}
public static long fnv1a_64(char[] chars) {
if (chars == null) {
return 0;
@@ -468,5 +487,13 @@ public final class FnvHash {
long SOURCE = fnv1a_64_lower("SOURCE");
long STAR = fnv1a_64_lower("*");
long TO_CHAR = fnv1a_64_lower("TO_CHAR");
long SYS_GUID = fnv1a_64_lower("SYS_GUID");
long STATISTICS = fnv1a_64_lower("STATISTICS");
long TRANSACTION = fnv1a_64_lower("TRANSACTION");
long OFF = fnv1a_64_lower("OFF");
long IDENTITY_INSERT = fnv1a_64_lower("IDENTITY_INSERT");
}
}