Please pay attention on issues you submitted, because we maybe need more details.
If no response more than 7 days and we cannot reproduce it on current information, we will close it.
---------------------------PreparedStatement ------------------------------
private static void processWithHintValue(final DataSource dataSource) throws SQLException {
String sql = "SELECT * from t_order ";
try (HintManager hintManager = HintManager.getInstance();
Connection connection = dataSource.getConnection();
PreparedStatement statement = connection.prepareStatement(sql)) {
setHintValue(hintManager);
statement.execute();
//statement.execute("SELECT i.* FROM t_order o, t_order_item i WHERE o.order_id = i.order_id");
// statement.execute("select * from t_order_item");
// statement.execute("INSERT INTO t_order (user_id, address_id, status) VALUES (1, 1, 'init')");
}
}
[INFO ] 2019-11-15 17:08:56,599 --main-- [ShardingSphere-SQL] Actual SQL: ds_0 ::: SELECT from t_order
[INFO ] 2019-11-15 17:08:56,599 --main-- [ShardingSphere-SQL] Actual SQL: ds_1 ::: SELECT from t_order
Question
For English only, other languages will not accept.
Before asking a question, make sure you have:
Please pay attention on issues you submitted, because we maybe need more details. If no response more than 7 days and we cannot reproduce it on current information, we will close it. ---------------------------PreparedStatement ------------------------------ private static void processWithHintValue(final DataSource dataSource) throws SQLException {
[INFO ] 2019-11-15 17:08:56,599 --main-- [ShardingSphere-SQL] Actual SQL: ds_0 ::: SELECT from t_order
[INFO ] 2019-11-15 17:08:56,599 --main-- [ShardingSphere-SQL] Actual SQL: ds_1 ::: SELECT from t_order
--------------------------statement----------------------------------------- private static void processWithHintValue(final DataSource dataSource) throws SQLException {
// PreparedStatement statement = connection.prepareStatement(sql)) { // setHintValue(hintManager); // statement.execute(); Statement statement = connection.createStatement()) { setHintValue(hintManager); statement.execute(sql); //statement.execute("SELECT i. FROM t_order o, t_order_item i WHERE o.order_id = i.order_id"); // statement.execute("select from t_order_item"); // statement.execute("INSERT INTO t_order (user_id, address_id, status) VALUES (1, 1, 'init')"); } }
[INFO ] 2019-11-15 17:11:04,793 --main-- [ShardingSphere-SQL] Actual SQL: ds_0 ::: SELECT * from t_order