first commit

This commit is contained in:
renjianbo
2026-01-07 11:40:41 +08:00
parent 2b5d784e31
commit 8f2ed2c108
6466 changed files with 1431506 additions and 0 deletions

View File

@@ -0,0 +1,51 @@
<?php
/**
* Zend Framework
*
* LICENSE
*
* This source file is subject to the new BSD license that is bundled
* with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://framework.zend.com/license/new-bsd
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@zend.com so we can send you a copy immediately.
*
* @category Zend
* @package Zend_Queue
* @subpackage Adapter
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id: Message.php 20096 2010-01-06 02:05:09Z bkarwin $
*/
/**
* @see Zend_Db_Table_Abstract
*/
require_once 'Zend/Db/Table/Abstract.php';
/**
* @category Zend
* @package Zend_Queue
* @subpackage Adapter
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
class Zend_Queue_Adapter_Db_Message extends Zend_Db_Table_Abstract
{
/**
* @var string
*/
protected $_name = 'message';
/**
* @var string
*/
protected $_primary = 'message_id';
/**
* @var mixed
*/
protected $_sequence = true;
}

View File

@@ -0,0 +1,51 @@
<?php
/**
* Zend Framework
*
* LICENSE
*
* This source file is subject to the new BSD license that is bundled
* with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://framework.zend.com/license/new-bsd
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@zend.com so we can send you a copy immediately.
*
* @category Zend
* @package Zend_Queue
* @subpackage Adapter
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id: Queue.php 20096 2010-01-06 02:05:09Z bkarwin $
*/
/**
* @see Zend_Db_Table_Abstract
*/
require_once 'Zend/Db/Table/Abstract.php';
/**
* @category Zend
* @package Zend_Queue
* @subpackage Adapter
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
class Zend_Queue_Adapter_Db_Queue extends Zend_Db_Table_Abstract
{
/**
* @var string
*/
protected $_name = 'queue';
/**
* @var string
*/
protected $_primary = 'queue_id';
/**
* @var mixed
*/
protected $_sequence = true;
}

View File

@@ -0,0 +1,75 @@
-- phpMyAdmin SQL Dump
-- version 2.11.6
-- http://www.phpmyadmin.net
--
-- Host: localhost:3306
-- Generation Time: Jun 19, 2008 at 08:09 PM
-- Server version: 5.0.51
-- PHP Version: 5.2.3
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
/*
Sample grant for MySQL
GRANT DELETE, INSERT, SELECT, UPDATE ON queue.* TO 'queue'@'127.0.0.1' IDENTIFIED BY '[CHANGE ME]';
mysql -u queue -h 127.0.0.1 -p queue
mysqlaccess queue queue --superuser=root -H 127.0.0.1
*/
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;
--
-- Database: `queue`
--
-- --------------------------------------------------------
--
-- Table structure for table `message`
--
DROP TABLE IF EXISTS `message`;
CREATE TABLE IF NOT EXISTS `message` (
`message_id` bigint(20) unsigned NOT NULL auto_increment,
`queue_id` int(10) unsigned NOT NULL,
`handle` char(32) default NULL,
`body` varchar(8192) NOT NULL,
`md5` char(32) NOT NULL,
`timeout` decimal(14,4) unsigned default NULL,
`created` int(10) unsigned NOT NULL,
PRIMARY KEY (`message_id`),
UNIQUE KEY `message_handle` (`handle`),
KEY `message_queueid` (`queue_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- --------------------------------------------------------
--
-- Table structure for table `queue`
--
DROP TABLE IF EXISTS `queue`;
CREATE TABLE IF NOT EXISTS `queue` (
`queue_id` int(10) unsigned NOT NULL auto_increment,
`queue_name` varchar(100) NOT NULL,
`timeout` smallint(5) unsigned NOT NULL default '30',
PRIMARY KEY (`queue_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
--
-- Constraints for dumped tables
--
--
-- Constraints for table `message`
--
ALTER TABLE `message`
ADD CONSTRAINT `message_ibfk_1` FOREIGN KEY (`queue_id`) REFERENCES `queue` (`queue_id`) ON DELETE CASCADE ON UPDATE CASCADE;

View File

@@ -0,0 +1,49 @@
/*
Sample grant for PostgreSQL
CREATE ROLE queue LOGIN
PASSWORD '[CHANGE ME]'
NOSUPERUSER NOINHERIT NOCREATEDB NOCREATEROLE;
*/
--
-- Table structure for table `queue`
--
DROP TABLE IF EXISTS queue;
CREATE TABLE queue
(
queue_id serial NOT NULL,
queue_name character varying(100) NOT NULL,
timeout smallint NOT NULL DEFAULT 30,
CONSTRAINT queue_pk PRIMARY KEY (queue_id)
)
WITH (OIDS=FALSE);
ALTER TABLE queue OWNER TO queue;
-- --------------------------------------------------------
--
-- Table structure for table `message`
--
DROP TABLE IF EXISTS message;
CREATE TABLE message
(
message_id bigserial NOT NULL,
queue_id integer,
handle character(32),
body character varying(8192) NOT NULL,
md5 character(32) NOT NULL,
timeout real,
created integer,
CONSTRAINT message_pk PRIMARY KEY (message_id),
CONSTRAINT message_ibfk_1 FOREIGN KEY (queue_id)
REFERENCES queue (queue_id) MATCH SIMPLE
ON UPDATE CASCADE ON DELETE CASCADE
)
WITH (OIDS=FALSE);
ALTER TABLE message OWNER TO queue;

View File

@@ -0,0 +1,41 @@
/*
* @version $Id: queue_sqlite.sql 20874 2010-02-03 13:14:59Z matthew $
Sample grant for SQLite
CREATE ROLE queue LOGIN
PASSWORD '[CHANGE ME]'
NOSUPERUSER NOINHERIT NOCREATEDB NOCREATEROLE;
*/
--
-- Table structure for table `queue`
--
CREATE TABLE queue
(
queue_id INTEGER PRIMARY KEY AUTOINCREMENT,
queue_name VARCHAR(100) NOT NULL,
timeout INTEGER NOT NULL DEFAULT 30
);
-- --------------------------------------------------------
--
-- Table structure for table `message`
--
CREATE TABLE message
(
message_id INTEGER PRIMARY KEY AUTOINCREMENT,
queue_id INTEGER PRIMARY KEY,
handle CHAR(32),
body VARCHAR(8192) NOT NULL,
md5 CHAR(32) NOT NULL,
timeout REAL,
created INTEGER,
FOREIGN KEY (queue_id) REFERENCES queue(queue_id)
);

View File

@@ -0,0 +1,44 @@
CREATE TABLE [dbo].[queue](
[queue_id] [int] IDENTITY(1,1) NOT NULL,
[queue_name] [varchar](100) NOT NULL,
[timeout] [int] NOT NULL,
CONSTRAINT [PK_queue] PRIMARY KEY CLUSTERED
(
[queue_id] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[queue] ADD DEFAULT ((30)) FOR [timeout]
GO
CREATE TABLE [dbo].[message](
[message_id] [bigint] IDENTITY(1,1) NOT NULL,
[queue_id] [int] NOT NULL,
[handle] [char](32) NULL,
[body] [varchar](max) NOT NULL,
[md5] [char](32) NOT NULL,
[timeout] [decimal](14, 4) NULL,
[created] [int] NOT NULL,
CONSTRAINT [PK_message] PRIMARY KEY CLUSTERED
(
[message_id] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[message] WITH CHECK ADD CONSTRAINT [fk_message_queue_id] FOREIGN KEY([queue_id])
REFERENCES [dbo].[queue] ([queue_id])
GO
ALTER TABLE [dbo].[message] CHECK CONSTRAINT [fk_message_queue_id]
GO