Added by Luiz Fernando Furtado, last edited by Luiz Fernando Furtado on Oct 27, 2008  (view change)

Labels

 
(None)

Zend Framework: Zend_Db Firebird-Interbase support Component Proposal

Proposed Component Name Zend_Db Firebird-Interbase support
Developer Notes http://framework.zend.com/wiki/display/ZFDEV/Zend_Db Firebird-Interbase support
Proposers Luiz Fernando Furtado
Ralph Schindler, Zend liaison
Revision 1.1 - 14 August 2007: Initial version.
1.2 - 01 October 2007: Ready for revision version (Merged Adapter and Statement proposals).
1.3 - 05 October 2007: Transaction support now works (no nested transaction support).
1.4 - 30 October 2007: (in progress) writing unit tests.
1.5 - 22 January 2008: Almost all tests done, need to improve transaction support, foldCase and AutoQuoteIdentifiers.
1.6 - 29 January 2008: All Tests complete.
1.8 - 30 January 2008: PDO support development started...and canceled (PHP PDO Firebird extension is in experimental status)
1.9 - ?? February 2008: Run tests with FB 1, 1.5, 2, 2.1 and IB 6, 7.5, 2007.
2.0 - October 2008: Bugs in the issue tracker fixed. (wiki revision: 24)

Table of Contents

1. Overview

Implements Zend_Db_Adapter and Zend_Db_Statement to use with Firebird/Interbase PHP extension.

2. References

3. Component Requirements, Constraints, and Acceptance Criteria

This Adapter uses the PHP extension interbase (php_interbase).

Firebird/Interbase does not support auto-incrementing keys, so you should specify the name of a sequence to lastInsertId() or lastSequenceId().

4. Dependencies on Other Framework Components

  • Zend_DB_Adapter
  • Zend_DB_Statement

5. Theory of Operation

See Zend_Db_Adapter and Zend_Db_Statement usage.

6. Milestones / Tasks

  • Milestone 1: (DONE) Publish the code based on Zend_Db Mysqli and Zend_Db Oracle adapted to Firebird
  • Milestone 2: (DONE) Bugs fix and improvements.
  • Milestone 3: (DONE) Write and run tests.
  • Milestone 4: (DONE) PDO support canceled due to PHP PDO Firebird is in experimental status.
  • Milestone 5: (DONE) Run tests with many server versions.
  • Milestone 6: (DONE) Coding standart review.
  • Milestone 7: (DONE) Fix bugs reported by the comunity.
  • Milestone 8: Include in the core library.

7. Class Index

  • Zend_DB_Adapter_Firebird
  • Zend_DB_Adapter_Firebird_Exception
  • Zend_DB_Adapter_Statement
  • Zend_DB_Adapter_Statement_Exception

8. Use Cases

No use cases listed.

9. Class Skeletons

Implements Zend_Db_Adapter and Zend_Db_Statement.

Bug fixed: Correct table alias without ' AS '.

Based on historical precedence, a formal proposal is not necessary for development of a new database adapter, but my personal opinion is that it's best we have one.

I looked at Firebird some time ago, and I recall thinking that it seemed to be an excellent choice for an RDBMS, but I never had a good chance to use it in a project (until now). Thanks for putting this forward!

To complete this proposal, I would recommend the following:

  • Any requirements, constraints, or acceptance criteria specific to Firebird should be listed in the corresponding section (3)
  • We should have some use cases (section 8), in order to uncover and illustrate items specific to Firebird. The use cases may also aid as a foundation for writing unit tests and documentation for this adapter.

Will this adapter be tested against both Interbase and Firebird? Also, do we have any indication of how much interest in firebird exists in the PHP community?

Zend Comments

This proposal is approved for incubator development, provided that the following issues are addressed:

  • Which databases will this adapter support with tests? (i.e., Firebird, Interbase, or both)
  • The documentation must clearly indicate the answer to the above question.

This adapter will be tested with FirebirdSQL and Interbase.

FirebirdSQL is a open source fork of Interbase 6 and the two are compatible, except by some very especific features that not is the focus of Zend_Db components.

Thanks for clarifying this for us, Luiz!