JDBC 驱动程序开发文档 (SPI) 需要哪些类
如果我想实现一个 JDBC 驱动程序,我如何知道需要实现哪些接口/抽象类才能成功运行?在阅读源代码时,看起来我会考虑 java.sql 包中的 API(例如 DriverManager)和 SPI 类。
我一直在阅读文档,但我还没有找到“为了开发驱动程序,您需要实现驱动程序、连接、结果集等”。
仅供参考 - 我问的原因是我正在开发一个包含 Provider 的 API。我正在尝试确定构建和记录代码的最佳方法。
If I wanted to implement a JDBC Driver, how would I know which interfaces/abstract classes I would need to implement in order to play successfully? In reading through the source, it looks like there are classes that I would consider both API(e.g. DriverManager) and SPI in the java.sql package.
I've been reading through the documentation but I am yet to find "In order to develop a driver you need to implement Driver, Connection, ResultSet, etc."
FYI - The reason I ask is that I am developing an API that includes a Provider. I'm trying to determine the best way to structure and document my code.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
看起来您应该查阅 JDBC 规范来了解构建 JDBC 驱动程序所需的内容。以下是来自 JCP 社区的 JDBC 3 规范的链接
http://jcp.org/en/jsr/detail?id=54
Looks like you should consult a JDBC specification for understanding what's required to build a JDBC driver. Below is link to JDBC 3 specs from JCP community
http://jcp.org/en/jsr/detail?id=54