承接 99designs/pheasant-adodb 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

99designs/pheasant-adodb

最新稳定版本:v1.0.0

Composer 安装命令:

composer require 99designs/pheasant-adodb

包简介

A subset of the ADOdb API on Pheasant

README 文档

README

Implements a subset of the ADOdb API using Pheasant

Example Usage

# set up Pheasant connection
$pheasant = \Pheasant::setup('mysql://user@localhost/mydb');
$adodbConnection = new \PheasantAdodb\Connection($pheasant->connection());

# start using ADOdb API
$adodbConnection->Execute("SELECT 1,2,3")->GetAll();

Or as a drop in replacement for adodb, you can use the compatability include files

# include compatibility files
require_once('adodb/adodb.inc.php');
require_once('adodb/adodb-exceptions.inc.php');

# instantiate ADOdb, set fetch mode
$adodbConnection = ADONewConnection('mysql://user@localhost/mydb');
$adodbConnection->setFetchMode(ADODB_FETCH_ASSOC);

# start using ADOdb API
$adodbConnection->Execute("SELECT 1,2,3")->GetAll();

Limitations and assumptions

  • Tries to match the behavour of ADOdb v4.81 with the adodb-mysqlt driver only
  • ->Replace( does not support disabling auto quoting
  • Every field is escaped as if it were a string
  • Magic quotes not supported
  • If instantiated directly
    • Assumes ADODB_FETCH_ASSOC as the only fetchmode
    • Throws exceptions instead of returning error codes
  • If instantiated via ADONewConnection
    • requires ->setFetchMode(ADODB_FETCH_ASSOC) to be called
    • returns error codes unless adodb-exceptions.inc.php is included

Testing

The testsuite uses the real adodb (with mysqlt driver) to compare the results from API calls.

composer install --dev
mysql -e 'create database pheasantadodb_test1;'
mysql -e 'create database pheasantadodb_test2;'
phpunit

Build Status

统计信息

  • 总下载量: 13.89k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: BSD-4-Clause
  • 更新时间: 2013-01-03