mirror of
https://github.com/alibaba/druid.git
synced 2023-03-04 19:17:16 +00:00
improved sql parser for db2.
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user