torres-developer/pdo 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

torres-developer/pdo

Composer 安装命令:

composer require torres-developer/pdo

包简介

PDO wrapper API

README 文档

README

An Wrapper API for the PHP PDO.

Basic Usage:

<?php

require __DIR__ ."/../vendor/autoload.php";

$dbh = new \TorresDeveloper\PdoWrapperAPI\mysqlConnection(
    new Core\PDODataSourceName([
        "host" => "192.168.1.40",
        "database" => "exampleDatabase",
    ], Core\Credentials::getCredentials(
        "user",
        "passwd"
    ))
);

/*
 * Use the CRUD interface for easy operations:
 * - select;
 * - insert;
 * - update;
 * - delete.
 */

// get all from all users
$dbh->select("user")->fetchAll(PDO::FETCH_OBJ);
// get all users `id`
$dbh->select("id", "user")->fetchAll(PDO::FETCH_OBJ);
// get all users `name` and `age`
$dbh->select(["name", "age"], "user")->fetchAll(PDO::FETCH_OBJ);

// insert new users
$users = [
    ["id" => 123, "name" => "asdfs"],
    ["age" => 2],
    ["id" => null, "text" => "y7tgebh"]
];
$dbh->insert("user", ...$users);

/*
 * You can use a query builder for more complex operations:
 */
$dbh->getBuider()->select()
    ->from("user")
    ->limit(5)
    ->run()
    ->fetchAll(\PDO::FETCH_OBJ)

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: AGPL-3.0-or-later
  • 更新时间: 2022-10-16

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固