There are no Zend_Queue_Adapter_Db table definitions for Microsoft SQL Server.
Comments
Posted by Nathan Bell (nathanpbell) on 2010-11-02T20:55:07.000+0000
Here is a Zend_Queue_Adapter_Db table definition file for MS SQL Server 2008. I have not tested it on earlier versions of SQL, but it may work for them as well.
The difference between this and the MySQL database definitions is that there is no UNIQUE constraint on the the 'handle' column, but that constraint is not necessary with a minimal change to the Zend_Queue_Db_Adapter::deleteMessage() method. Namely, change:
public function deleteMessage(Zend_Queue_Message $message)
{
$db = $this->_messageTable->getAdapter();
if ($this->_messageTable->delete($where)) {
return true;
}
return false;
}
Posted by Matthew Weier O'Phinney (matthew) on 2010-11-04T21:33:27.000+0000
Added to trunk and 1.11 release branch
Posted by Nathan Bell (nathanpbell) on 2010-11-05T16:32:59.000+0000
Thanks for accepting my patch. However, with out the mentioned change to Zend_Queue_Db_Adapter::deleteMessage(), the provided SQL file will not work with Zend_Queue.
Comments
Posted by Nathan Bell (nathanpbell) on 2010-11-02T20:55:07.000+0000
Here is a Zend_Queue_Adapter_Db table definition file for MS SQL Server 2008. I have not tested it on earlier versions of SQL, but it may work for them as well.
The difference between this and the MySQL database definitions is that there is no UNIQUE constraint on the the 'handle' column, but that constraint is not necessary with a minimal change to the Zend_Queue_Db_Adapter::deleteMessage() method. Namely, change:
- $where = $db->quoteInto('handle=?', $message->handle); + $where = array(); + $where[] = $db->quoteInto('message_id=?', $message->message_id); + $where[] = $db->quoteInto('handle=?', $message->handle);
Posted by Matthew Weier O'Phinney (matthew) on 2010-11-04T21:33:27.000+0000
Added to trunk and 1.11 release branch
Posted by Nathan Bell (nathanpbell) on 2010-11-05T16:32:59.000+0000
Thanks for accepting my patch. However, with out the mentioned change to Zend_Queue_Db_Adapter::deleteMessage(), the provided SQL file will not work with Zend_Queue.