定制 decmuc/pdodb 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

decmuc/pdodb

最新稳定版本:v1.3.9

Composer 安装命令:

composer require decmuc/pdodb

包简介

Modern, secure and fully compatible PDO-based replacement for ThingEngineer’s PHP-MySQLi-Database-Class

README 文档

README

PDOdb is a modern database wrapper and SQL builder for PHP 8+, built on top of PDO.
It offers full support for secure query building, prepared statements, dynamic joins, subqueries, transactions, and strict validation.

🔒 Safe by default.
⚙️ Fast, clean, extendable.
📘 Documentation:
👉 https://DocsPDOdb.decmuc.dev/

Features

  • Intuitive query builder (get(), insert(), update(), delete())
  • Smart where*() methods with type validation
  • Nested queries, joins, subqueries, aliases
  • Safe ORDER/GROUP clause parsing with heuristics
  • Locking, transactions, pagination, bulk insert
  • Inspired by ThingEngineer/MySQLiDB, but built for PDO with a similar API and strict SQL injection protection.

Installation

composer require decmuc/pdodb

Quick Example

Two lines for 90% of queries. MySQL-first, prepared by default—no manual prepare() or binding.

$db->whereInt('id', 42);
$user = $db->getOne('users');

// Booleans made easy
$db->whereBool('status', true);
$users = $db->get('users');
// In short:
$users = $db->whereBool('status', true)->get('users');
// whereBool('status', 1) + get('users') is equivalent to
// SELECT * FROM users WHERE status = 1.
// false → 0 (or FALSE)
$users = $db->whereBool('status', false)->get('users');
// SELECT * FROM `users` WHERE `status` = 0

// Chaining with other conditions
$users = $db->whereBool('is_active', true)
   ->where('role', 'admin')
   ->orderBy('created_at', 'DESC')
   ->get('users');

For comprehensive documentation and more examples, visit the PDOdb docs: https://DocsPDOdb.decmuc.dev

📝 License / Lizenz

This project is licensed under the MIT License. See LICENSE for details

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-07-02