improved sql parser for db2.

This commit is contained in:
wenshao
2018-02-04 16:14:52 +08:00
parent 02e3a57828
commit 30a883a74f
2 changed files with 4 additions and 1 deletions
@@ -26,5 +26,6 @@ public interface DB2Object extends SQLObject {
interface Constants {
long CURRENT_DATE = FnvHash.fnv1a_64_lower("CURRENT DATE");
long CURRENT_TIME = FnvHash.fnv1a_64_lower("CURRENT TIME");
long CURRENT_SCHEMA = FnvHash.fnv1a_64_lower("CURRENT SCHEMA");
}
}
@@ -60,6 +60,8 @@ public class DB2SchemaStatVisitor extends SchemaStatVisitor implements DB2ASTVis
}
protected boolean isPseudoColumn(long hash64) {
return hash64 == DB2Object.Constants.CURRENT_DATE || hash64 == DB2Object.Constants.CURRENT_TIME;
return hash64 == DB2Object.Constants.CURRENT_DATE
|| hash64 == DB2Object.Constants.CURRENT_TIME
|| hash64 == DB2Object.Constants.CURRENT_SCHEMA;
}
}