use of io.shardingjdbc.core.rule.ShardingRule in project sharding-jdbc by shardingjdbc.
the class DeleteStatementParserTest method parseStatementWithDeleteMultipleTableWithUsing.
@Test(expected = UnsupportedOperationException.class)
public void parseStatementWithDeleteMultipleTableWithUsing() {
ShardingRule shardingRule = createShardingRule();
new SQLParsingEngine(DatabaseType.MySQL, "DELETE FROM TABLE_XXX1, TABLE_xxx2 USING TABLE_XXX1 JOIN TABLE_XXX2", shardingRule).parse();
}
use of io.shardingjdbc.core.rule.ShardingRule in project sharding-jdbc by shardingjdbc.
the class InsertStatementParserTest method assertParseWithGenerateKeyColumnsWithoutParameter.
@Test
public void assertParseWithGenerateKeyColumnsWithoutParameter() {
ShardingRule shardingRule = createShardingRuleWithGenerateKeyColumns();
SQLParsingEngine statementParser = new SQLParsingEngine(DatabaseType.MySQL, "INSERT INTO `TABLE_XXX` (`field1`) VALUES (10)", shardingRule);
InsertStatement insertStatement = (InsertStatement) statementParser.parse();
assertInsertStatementWithoutParameter(insertStatement);
}
use of io.shardingjdbc.core.rule.ShardingRule in project sharding-jdbc by shardingjdbc.
the class InsertStatementParserTest method parseInsertAllForOracle.
@Test(expected = SQLParsingUnsupportedException.class)
public void parseInsertAllForOracle() {
ShardingRule shardingRule = createShardingRule();
new SQLParsingEngine(DatabaseType.Oracle, "INSERT ALL INTO TABLE_XXX (field1) VALUES (field1) SELECT field1 FROM TABLE_XXX2", shardingRule).parse();
}
use of io.shardingjdbc.core.rule.ShardingRule in project sharding-jdbc by shardingjdbc.
the class InsertStatementParserTest method parseMultipleInsertForMySQL.
@Test
public // TODO assert
void parseMultipleInsertForMySQL() {
ShardingRule shardingRule = createShardingRule();
new SQLParsingEngine(DatabaseType.MySQL, "INSERT INTO TABLE_XXX (`field1`, `field2`) VALUES (1, 'value_char'), (2, 'value_char')", shardingRule).parse();
}
use of io.shardingjdbc.core.rule.ShardingRule in project sharding-jdbc by shardingjdbc.
the class InsertStatementParserTest method parseInsertFirstForOracle.
@Test(expected = SQLParsingUnsupportedException.class)
public void parseInsertFirstForOracle() {
ShardingRule shardingRule = createShardingRule();
new SQLParsingEngine(DatabaseType.Oracle, "INSERT FIRST INTO TABLE_XXX (field1) VALUES (field1) SELECT field1 FROM TABLE_XXX2", shardingRule).parse();
}
Aggregations