创建 Moose 对象以与 Oracle/mysql 数据库交互
我需要有关创建与 Oracle/mysql 交互的类的指导。
基本要求是:
- 与 oracle/mysql 数据库连接/断开连接。
- 查询表并返回数据。
- 处理数据并创建相关的 html 报告。
我正在使用 Moose,并且想在 Moose 框架内创建对象。我参与的项目要求定期执行这些任务,并且我想开始使用 OOP 来利用“一次编写代码”的理念。
我们将非常感谢您的帮助。
I need guidance on creating Classes that will interact with Oracle/mysql.
The basic requirements would be to :
- connect/disconnect to/from oracle/mysql database.
- query tables and return data.
- process data and create relevant html reports.
I am using Moose and would like to create Objects within the Moose framework. The projects I am involved with require these tasks to be performed regularly and I want to start making use of OOP to take advantage of the 'write code once' philosophy.
Your assistance will be highly appreciated.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
DBIx::Class 可能是您的正在寻找以 OOP 风格管理数据库连接/查询的方法。它也适用于驼鹿。
DBIx::Class is probably what you are looking for for managing the database connection/queries in an OOP style. It also works well with Moose.