FileSqlManager fm = new FileSqlManager("dbtest/");
List<Sql> sqlList = fm.createCombo(fm.keys());
Sql[] sqls = sqlList.toArray(new Sql[sqlList.size()]);
for (Sql sql : sqls) {
dao.execute(sql);
}
[DEBUG] 2019-01-18 18:50:09,589 org.nutz.resource.Scans.scan(Scans.java:280) - Found 1 resource by src( dbtest/ ) , regex( .(sql|sqlx|sqls)$ )
[DEBUG] 2019-01-18 18:50:09,590 org.nutz.dao.impl.FileSqlManager.refresh(FileSqlManager.java:59) - load >> TEST_ASSESS_ANNUAL.sql from root=dbtest/
[INFO ] 2019-01-18 18:50:09,591 org.nutz.dao.impl.FileSqlManager.add(FileSqlManager.java:116) - skip not key sql line INSERT INTO TEST.ASSESS_ANNUAL (ID, TITLE, YEAR, REMARKS, CREATION_TIME, STATE, OPBY, OPAT, DELFLAG) VALUES ('2484c8d359ec4fcfb8b0a33440100447', '2018年年度考核', '2018year', '2018年年度部门考核', '1547358403724', 'annual_selfReviewing', 'scshwhszhxxg_admin', '1547358403724', '0')
[DEBUG] 2019-01-18 18:50:09,591 org.nutz.dao.impl.FileSqlManager.refresh(FileSqlManager.java:66) - load 0 sql >> TEST_ASSESS_ANNUAL.sql from root=dbtest/
dbtest/底下只有个.sql文件
INSERT INTO TEST.ASSESS_ANNUAL (ID, TITLE, YEAR, REMARKS, CREATION_TIME, STATE, OPBY, OPAT, DELFLAG) VALUES ('2484c8d359ec4fcfb8b0a33440100447', '2018年年度考核', '2018year', '2018年年度部门考核', '1547358403724', 'annual_selfReviewing', 'scshwhszhxxg_admin', '1547358403724', '0');