GetGeneratedKeysHelper 与反射
此类中用了最基本的一些反射方法,应该说是检验反射功底的好东西。
例如:
![](/Images/OutliningIndicators/None.gif)
跟 PreparedStatement.RETURN_GENERATED_KEYS 是不一样的。
前者可以动态找到运行时参数的当前值,而后者得到的只是硬编码时的初始值。
另外,还有一个不明白的就是,代码中使用了:
![](/Images/OutliningIndicators/ExpandedBlockStart.gif)
![](/Images/OutliningIndicators/ExpandedBlockStart.gif)
![](/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
![](/Images/OutliningIndicators/InBlock.gif)
![](/Images/dot.gif)
![](/Images/OutliningIndicators/InBlock.gif)
![](/Images/OutliningIndicators/ExpandedBlockEnd.gif)
为什么不直接使用conn.prepareStatement(...)呢?
此类中用了最基本的一些反射方法,应该说是检验反射功底的好东西。
例如:
跟 PreparedStatement.RETURN_GENERATED_KEYS 是不一样的。
前者可以动态找到运行时参数的当前值,而后者得到的只是硬编码时的初始值。
另外,还有一个不明白的就是,代码中使用了: