ZF-10597: Zend_Queue_Adapter_Db provides no mechanism for using custom table names

Issue Type: Improvement Created: 2010-10-25T13:01:35.000+0000 Last Updated: 2013-03-13T20:55:22.000+0000 Status: Open Fix version(s): - Next Mini Release ()

Reporter: Nathan Bell (nathanpbell) Assignee: Marc Hodgins (mjh_ca) Tags: - Zend_Queue

  • FixForZF1.12.1
  • zf-crteam-review

Related issues: Attachments: - ZF-10597-test-setup.txt


In order to use table names other than 'queue' and 'message' in Zend_Queue_Adapter_Db, one must currently extend three classes:

  1. Zend_Queue_Adapter_Db_Message to change the message table name
  2. Zend_Queue_Adapter_Db_Queue to change the queue table name
  3. Zend_Queue_Adapter_Db to override __construct or add table setter methods to override the default table usage.

It seems like this is something that should and could be supported easily through an option key or setter method.


Posted by Marc Hodgins (mjh_ca) on 2010-11-25T08:43:40.000+0000

Patch with unit test and updated docs attached.

Also attaching instructions on TestConfiguration.php settings and related steps to turn on the the Zend_Queue_Db unit tests to make it easier for whoever is testing/applying this patch. Thanks!

Posted by paulo vitor bettini de albuquerque lima (paulovitorbal) on 2011-06-30T13:14:36.000+0000

As well as the name of the table, we should have an option to the schema too. It will be nice, while working with postgres.

Posted by paulo vitor bettini de albuquerque lima (paulovitorbal) on 2011-06-30T13:35:33.000+0000

While working with the Db adapter, why not use the Zend_Db_Table classes, for message and queue? Doing this, we could intercept the methods used by, like the insert, or the update.Instead of using the database adapter methods for update, select, insert, I purpose to use the Zend_Db_Table methods.

Have you found an issue?

See the Overview section for more details.


© 2006-2018 by Zend, a Rogue Wave Company. Made with by awesome contributors.

This website is built using zend-expressive and it runs on PHP 7.