Skip to content

Commit e7006b2

Browse files
author
core-lib
committed
增加脚本指令解析
1 parent aebbc8a commit e7006b2

4 files changed

Lines changed: 9 additions & 5 deletions

File tree

src/main/java/io/sqlman/version/JdbcVersionManager.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ public Integer execute(Connection connection) throws SQLException {
150150
SqlSentence sentence = script.sentence(ordinal);
151151
String sql = sentence.value();
152152

153-
logger.info("Executing sentence {}/{} of script version {} in {} transaction isolation level : {}", ordinal, script.sqls(), script.version(), isolation, sql.replaceAll("\\s+", " "));
153+
logger.info("Executing sentence {}/{} of script version {} under {} transaction isolation level : {}", ordinal, script.sqls(), script.version(), isolation, sql.replaceAll("\\s+", " "));
154154

155155
PreparedStatement statement = connection.prepareStatement(sql);
156156
int rows = statement.executeUpdate();

src/test/resources/application.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ sqlman:
1515
data-source: dataSource
1616
enabled: true
1717
dialect:
18-
table: SQLMAN_VERSION
18+
table: SCHEMA_VERSION
1919
type: MySQL
2020
script:
2121
provider: classpath
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
set transaction isolation level read committed;
2+
INSERT INTO SQLMAN_TEST1 (ID)
3+
VALUES (1);
4+
INSERT INTO SQLMAN_TEST2 (ID)
5+
VALUES (2);
6+
INSERT INTO SQLMAN_TEST3 (ID)
7+
VALUES (3);

src/test/resources/sqlman/v1.0.1-ATOMIC-SERIALIZABLE!插入数据.sql

Lines changed: 0 additions & 3 deletions
This file was deleted.

0 commit comments

Comments
 (0)