}
throw new DataAccessException("can't parse return type of [" + componentType);
}
private void initContext(ShardDefinition definition, Object[] args, SqlType sqlType) {
SqlExecuteContext context = new SqlExecuteContext();
context.setSqlType(sqlType);
Integer shardParamIndex = definition.getShardParamIndex();
if(shardParamIndex != null) {
Method shardGetter = definition.getShardGetter();
String shardParamName = definition.getShardParamName();
String shardTable = definition.getShardTable();
Object value =CommonUtils.fetchVlaue(shardGetter, shardParamIndex, args, shardParamName);
context.setShardParam(new ShardParam(shardTable, value));
}
SqlExecuteContextHolder.setContext(context);
}