TableShardRule#eval
根据路由规则解析sql的时候如果没匹配找到分片键的值
// full table scan if is not insert sql. if (type != SqlType.INSERT && type != SqlType.REPLACE) { if (forbidNoShardKeyWrite) { if (SqlType.UPDATE == type || SqlType.DELETE == type) { throw new ShardRouterException("Update or delete is forbidden without shard key!"); } } return new ShardEvalResult(tableName, masterDimension.getAllDBAndTables()); // 返回所有的库表 } else { throw new ShardRouterException("Cannot find any shard columns in your insert sql."); }