druid 1.2.6 sqlserver数据库 SchemaRepository resolve失败

ibrsph3r  于 4个月前  发布在  Druid
关注(0)|答案(1)|浏览(63)

代码如下:
SchemaRepository repository =new SchemaRepository(dbType);

repository.setDefaultSchema(currentSchema);

for(String ddl:createTableList){
  repository.console(ddl);
}

for(SQLStatement statement:stmtList){
  repository.resolve(statement,ResolveAllColumn, ResolveIdentifierAlias,CheckColumnAmbiguous);
}

SQL语句:
SELECT * FROM TestDB.dbo.Sensitive_Data ;

CREATE TABLE TestDB.dbo.Sensitive_Data(
"Email" varchar(50),
"Full_name" varchar(50),
"Business_address" varchar(100),
"Fixed_telephone" varchar(20),
IPV4 varchar(15),
"Birthday" date,
"Money" varchar(8),
"Enterprise_name" varchar(100),
"Detailed_date" datetime,
"Bank_card" varchar(19),
"Phone_number" varchar(11),
"IDcard" varchar(20),
YEAR varchar(10),
"Raddress" varchar(100),
USCC varchar(18),
ID int,
"License_plate" varchar(20)
);

ddl生成的schema名称为testdb.dbo,使用dbo查找不到testdb.dbo

nkcskrwz

nkcskrwz1#

主要问题是SELECT * FROM TestDB.dbo.Sensitive_Data ;,无法根据DDL语句解析出*代表的所有字段

相关问题