pax_global_header00006660000000000000000000000064126321151540014512gustar00rootroot0000000000000052 comment=8bda58293d6baa3e1d8316300fce0fed55df8ea0 zend-db-release-2.6.2/000077500000000000000000000000001263211515400144625ustar00rootroot00000000000000zend-db-release-2.6.2/.ci/000077500000000000000000000000001263211515400151335ustar00rootroot00000000000000zend-db-release-2.6.2/.ci/mysql_fixtures.sh000077500000000000000000000001531263211515400205670ustar00rootroot00000000000000#!/usr/bin/env bash echo "Configure MySQL test database" mysql -u root -e 'create database zenddb_test;' zend-db-release-2.6.2/.ci/pgsql_fixtures.sh000077500000000000000000000001631263211515400205510ustar00rootroot00000000000000#!/usr/bin/env bash echo "Configure PostgreSQL test database" psql -U postgres -c 'create database zenddb_test;' zend-db-release-2.6.2/CHANGELOG.md000066400000000000000000000064431263211515400163020ustar00rootroot00000000000000# Changelog All notable changes to this project will be documented in this file, in reverse chronological order by release. ## 2.6.2 - 2015-12-09 ### Added - [#49](https://github.com/zendframework/zend-db/pull/49) Add docbook documentation. ### Deprecated - Nothing. ### Removed - Nothing. ### Fixed - [#55](https://github.com/zendframework/zend-db/pull/55) Implement FeatureSet canCallMagicCall and callMagicCall methods - [#56](https://github.com/zendframework/zend-db/pull/56) AbstractResultSet::current now does validation to ensure an array. - [#58](https://github.com/zendframework/zend-db/pull/58) Fix unbuffered result on MySQLi. - [#59](https://github.com/zendframework/zend-db/pull/59) Allow unix_socket parameter ## 2.6.1 - 2015-10-14 ### Added - Nothing. ### Deprecated - Nothing. ### Removed - Nothing. ### Fixed - [#31](https://github.com/zendframework/zend-db/pull/31) fixes table gateway update when there is a table alias utilized. ## 2.6.0 - 2015-09-22 ### Added - [#42](https://github.com/zendframework/zend-db/pull/42) updates the component to use zend-hydrator for hydrator functionality; this provides forward compatibility with zend-hydrator, and backwards compatibility with hydrators from older versions of zend-stdlib. - [#15](https://github.com/zendframework/zend-db/pull/15) adds a new predicate, `Zend\Db\Sql\Predicate\NotBetween`, which can be invoked via `Sql` instances: `$sql->notBetween($field, $min, $max)`. - [#22](https://github.com/zendframework/zend-db/pull/22) extracts a factory, `Zend\Db\Metadata\Source\Factory`, from `Zend\Db\Metadata\Metadata`, removing the (non-public) `createSourceFromAdapter()` method from that class. Additionally, it extracts `Zend\Db\Metadata\MetadataInterface`, to allow creating alternate implementations. ### Deprecated - [#27](https://github.com/zendframework/zend-db/pull/27) deprecates the constants `JOIN_OUTER_LEFT` and `JOIN_OUTER_RIGHT` in favor of `JOIN_LEFT_OUTER` and `JOIN_RIGHT_OUTER`. ### Removed - Nothing. ### Fixed - Nothing. ## 2.5.2 - 2015-09-22 ### Added - Nothing. ### Deprecated - Nothing. ### Removed - [#29](https://github.com/zendframework/zend-db/pull/29) removes the required second argument to `Zend\Db\Predicate\Predicate::expression()`, allowing it to be nullable, and mirroring the constructor of `Zend\Db\Predicate\Expression`. ### Fixed - [#40](https://github.com/zendframework/zend-db/pull/40) updates the zend-stdlib dependency to reference `>=2.5.0,<2.7.0` to ensure hydrators will work as expected following extraction of hydrators to the zend-hydrator repository. - [#34](https://github.com/zendframework/zend-db/pull/34) fixes retrieval of constraint metadata in the Oracle adapter. - [#41](https://github.com/zendframework/zend-db/pull/41) removes hard dependency on EventManager in AbstractTableGateway. - [#17](https://github.com/zendframework/zend-db/pull/17) removes an executable bit on a regular file. - [#3](https://github.com/zendframework/zend-db/pull/3) updates the code to use closure binding (now that we're on 5.5+, this is possible). - [#9](https://github.com/zendframework/zend-db/pull/9) thoroughly audits the OCI8 (Oracle) driver, ensuring it provides feature parity with other drivers, and fixes issues with subselects, limits, and offsets. zend-db-release-2.6.2/CONTRIBUTING.md000066400000000000000000000220561263211515400167200ustar00rootroot00000000000000# CONTRIBUTING ## RESOURCES If you wish to contribute to Zend Framework, please be sure to read/subscribe to the following resources: - [Coding Standards](https://github.com/zendframework/zf2/wiki/Coding-Standards) - [Contributor's Guide](http://framework.zend.com/participate/contributor-guide) - ZF Contributor's mailing list: Archives: http://zend-framework-community.634137.n4.nabble.com/ZF-Contributor-f680267.html Subscribe: zf-contributors-subscribe@lists.zend.com - ZF Contributor's IRC channel: #zftalk.dev on Freenode.net If you are working on new features or refactoring [create a proposal](https://github.com/zendframework/zend-db/issues/new). ## Reporting Potential Security Issues If you have encountered a potential security vulnerability, please **DO NOT** report it on the public issue tracker: send it to us at [zf-security@zend.com](mailto:zf-security@zend.com) instead. We will work with you to verify the vulnerability and patch it as soon as possible. When reporting issues, please provide the following information: - Component(s) affected - A description indicating how to reproduce the issue - A summary of the security vulnerability and impact We request that you contact us via the email address above and give the project contributors a chance to resolve the vulnerability and issue a new release prior to any public exposure; this helps protect users and provides them with a chance to upgrade and/or update in order to protect their applications. For sensitive email communications, please use [our PGP key](http://framework.zend.com/zf-security-pgp-key.asc). ## RUNNING TESTS > ### Note: testing versions prior to 2.4 > > This component originates with Zend Framework 2. During the lifetime of ZF2, > testing infrastructure migrated from PHPUnit 3 to PHPUnit 4. In most cases, no > changes were necessary. However, due to the migration, tests may not run on > versions < 2.4. As such, you may need to change the PHPUnit dependency if > attempting a fix on such a version. To run tests: - Clone the repository: ```console $ git clone git@github.com:zendframework/zend-db.git $ cd ``` - Install dependencies via composer: ```console $ curl -sS https://getcomposer.org/installer | php -- $ ./composer.phar install ``` If you don't have `curl` installed, you can also download `composer.phar` from https://getcomposer.org/ - Run the tests via `phpunit` and the provided PHPUnit config, like in this example: ```console $ ./vendor/bin/phpunit ``` You can turn on conditional tests with the phpunit.xml file. To do so: - Copy `phpunit.xml.dist` file to `phpunit.xml` - Edit `phpunit.xml` to enable any specific functionality you want to test, as well as to provide test values to utilize. ### Execute tests against real database servers This projects provides a [Vagrant](https://www.vagrantup.com/) virtual machine definition with a MySQL and PostgreSQL servers installed and configured. For to execute the tests against this server do the following steps (assume you have Vagrant > 1.6 installed) 1. Run the virtual machine: `vagrant up` 2. Copy `phpunit.xml.dist` file to `phpunit.xml`. 3. Enable online tests by setting the following config options: * `TESTS_ZEND_DB_ADAPTER_DRIVER_MYSQL_HOSTNAME` value to `localhost` * `TESTS_ZEND_DB_ADAPTER_DRIVER_PGSQL_HOSTNAME` value to `localhost` 4. Run `./vendor/bin/phpunit`. When done, you can halt the test servers using `vagrant halt`. > ### Alternate ports > > Pay attention to the output from your `vagrant up` command. If you have MySQL or PostgreSQL > running locally, Vagrant will detect that the port is in use, and forward an alternate port to the > virtual machine's database server(s). You'll likely see output like the following: > > ``` > ==> default: Forwarding ports... > default: 3306 => 2200 (adapter 1) > default: 5432 => 5432 (adapter 1) > default: 22 => 2222 (adapter 1) > ``` > > In the above example, local port 2200 is forwarded to guest 3306; in other words, for testing > MySQL, port 2200 should be used. > > To specify the alternate port, append it to the hostname, separated by a colon: `localhost:2200`. > ### Alternate testing approach > > The PHPUnit config file defines environment variables, which allows users on unix-like systems to > simplify steps 2-4 to: > > ```console > $ TESTS_ZEND_DB_ADAPTER_DRIVER_MYSQL_HOSTNAME=localhost \ > > TESTS_ZEND_DB_ADAPTER_DRIVER_PGSQL_HOSTNAME=localhost \ > > ./vendor/bin/phpunit > ``` ## Running Coding Standards Checks This component uses [php-cs-fixer](http://cs.sensiolabs.org/) for coding standards checks, and provides configuration for our selected checks. `php-cs-fixer` is installed by default via Composer. To run checks only: ```console $ ./vendor/bin/php-cs-fixer fix . -v --diff --dry-run --config-file=.php_cs ``` To have `php-cs-fixer` attempt to fix problems for you, omit the `--dry-run` flag: ```console $ ./vendor/bin/php-cs-fixer fix . -v --diff --config-file=.php_cs ``` If you allow php-cs-fixer to fix CS issues, please re-run the tests to ensure they pass, and make sure you add and commit the changes after verification. ## Recommended Workflow for Contributions Your first step is to establish a public repository from which we can pull your work into the master repository. We recommend using [GitHub](https://github.com), as that is where the component is already hosted. 1. Setup a [GitHub account](http://github.com/), if you haven't yet 2. Fork the repository (http://github.com/zendframework/zend-db) 3. Clone the canonical repository locally and enter it. ```console $ git clone git://github.com:zendframework/zend-db.git $ cd zend-db ``` 4. Add a remote to your fork; substitute your GitHub username in the command below. ```console $ git remote add {username} git@github.com:{username}/zend-db.git $ git fetch {username} ``` ### Keeping Up-to-Date Periodically, you should update your fork or personal repository to match the canonical ZF repository. Assuming you have setup your local repository per the instructions above, you can do the following: ```console $ git checkout master $ git fetch origin $ git rebase origin/master # OPTIONALLY, to keep your remote up-to-date - $ git push {username} master:master ``` If you're tracking other branches -- for example, the "develop" branch, where new feature development occurs -- you'll want to do the same operations for that branch; simply substitute "develop" for "master". ### Working on a patch We recommend you do each new feature or bugfix in a new branch. This simplifies the task of code review as well as the task of merging your changes into the canonical repository. A typical workflow will then consist of the following: 1. Create a new local branch based off either your master or develop branch. 2. Switch to your new local branch. (This step can be combined with the previous step with the use of `git checkout -b`.) 3. Do some work, commit, repeat as necessary. 4. Push the local branch to your remote repository. 5. Send a pull request. The mechanics of this process are actually quite trivial. Below, we will create a branch for fixing an issue in the tracker. ```console $ git checkout -b hotfix/9295 Switched to a new branch 'hotfix/9295' ``` ... do some work ... ```console $ git commit ``` ... write your log message ... ```console $ git push {username} hotfix/9295:hotfix/9295 Counting objects: 38, done. Delta compression using up to 2 threads. Compression objects: 100% (18/18), done. Writing objects: 100% (20/20), 8.19KiB, done. Total 20 (delta 12), reused 0 (delta 0) To ssh://git@github.com/{username}/zend-db.git b5583aa..4f51698 HEAD -> master ``` To send a pull request, you have two options. If using GitHub, you can do the pull request from there. Navigate to your repository, select the branch you just created, and then select the "Pull Request" button in the upper right. Select the user/organization "zendframework" as the recipient. If using your own repository - or even if using GitHub - you can use `git format-patch` to create a patchset for us to apply; in fact, this is **recommended** for security-related patches. If you use `format-patch`, please send the patches as attachments to: - zf-devteam@zend.com for patches without security implications - zf-security@zend.com for security patches #### What branch to issue the pull request against? Which branch should you issue a pull request against? - For fixes against the stable release, issue the pull request against the "master" branch. - For new features, or fixes that introduce new elements to the public API (such as new public methods or properties), issue the pull request against the "develop" branch. ### Branch Cleanup As you might imagine, if you are a frequent contributor, you'll start to get a ton of branches both locally and on your remote. Once you know that your changes have been accepted to the master repository, we suggest doing some cleanup of these branches. - Local branch cleanup ```console $ git branch -d ``` - Remote branch removal ```console $ git push {username} : ``` zend-db-release-2.6.2/LICENSE.md000066400000000000000000000027551263211515400160770ustar00rootroot00000000000000Copyright (c) 2005-2015, Zend Technologies USA, Inc. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. - Neither the name of Zend Technologies USA, Inc. nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. zend-db-release-2.6.2/README.md000066400000000000000000000013351263211515400157430ustar00rootroot00000000000000# zend-db [![Build Status](https://secure.travis-ci.org/zendframework/zend-db.svg?branch=master)](https://secure.travis-ci.org/zendframework/zend-db) [![Coverage Status](https://coveralls.io/repos/zendframework/zend-db/badge.svg?branch=master)](https://coveralls.io/r/zendframework/zend-db?branch=master) `Zend\Db` is a component that abstract the access to a Database using an object oriented API to build the queries. `Zend\Db` consumes different storage adapters to access different database vendors such as MySQL, PostgreSQL, Oracle, IBM DB2, Microsoft Sql Server, PDO, etc. - File issues at https://github.com/zendframework/zend-db/issues - Documentation is at http://framework.zend.com/manual/current/en/index.html#zend-db zend-db-release-2.6.2/Vagrantfile000066400000000000000000000031261263211515400166510ustar00rootroot00000000000000# -*- mode: ruby -*- # vi: set ft=ruby : $install_software = <