mirror of
https://github.com/alibaba/druid.git
synced 2023-03-04 19:17:16 +00:00
rename 'MySqlReplicateStatement to MySqlReplaceStatement'
This commit is contained in:
@@ -49,6 +49,17 @@ public class REPLACE_Syntax_Test extends TestCase {
|
||||
Assert.assertEquals("REPLACE DELAYED INTO `online_users` (`session_id`, `user_id`, `page`, `lastview`)\nVALUES ('3580cc4e61117c0785372c426eddd11c', 'XXX', '/', NOW());",
|
||||
text);
|
||||
}
|
||||
|
||||
public void test_2() throws Exception {
|
||||
String sql = " replace into t(col1,col2)values(?,?)";
|
||||
|
||||
SQLStatementParser parser = new MySqlStatementParser(sql);
|
||||
List<SQLStatement> stmtList = parser.parseStatementList();
|
||||
|
||||
String text = output(stmtList);
|
||||
|
||||
Assert.assertEquals("REPLACE INTO t (col1, col2)\nVALUES (?, ?);", text);
|
||||
}
|
||||
|
||||
private String output(List<SQLStatement> stmtList) {
|
||||
StringBuilder out = new StringBuilder();
|
||||
|
||||
Reference in New Issue
Block a user