Download the PHP package fastd/medoodb without Composer
On this page you can find all versions of the php package fastd/medoodb. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download fastd/medoodb
More information about fastd/medoodb
Files in fastd/medoodb
Download fastd/medoodb
More information about fastd/medoodb
Files in fastd/medoodb
Vendor fastd
Package medoodb
Short Description Medoo-based database component with connection pooling and FastD integration.
License MIT
Homepage https://fastdlabs.com/
Package medoodb
Short Description Medoo-based database component with connection pooling and FastD integration.
License MIT
Homepage https://fastdlabs.com/
Please rate this library. Is it a good library?
Informations about the package medoodb
FastD MedooDB
FastD MedooDB 是基于 Medoo 的数据库组件,提供简洁的数据库操作接口,支持多连接池管理和 FastD 框架集成。
✨ 特性
- 🎯 基于 Medoo: 继承 Medoo 的所有功能,轻量且高效
- 🔗 连接池管理: 支持多数据库连接池,自动管理连接
- 🔌 多数据库支持: MySQL、PostgreSQL、SQLite、MariaDB、MSSQL 等
- 🚀 FastD 集成: 完美集成 FastD 框架,支持服务提供者
- ⚡ 自动重连: 连接断开时自动重连
- 🎨 简洁 API: 链式调用,简单易用
📋 环境要求
- PHP: >= 8.4.1
- 扩展:
- ext-pdo
- ext-pdo_mysql (MySQL)
- ext-pdo_sqlite (SQLite)
- 或其他需要的 PDO 驱动
- 依赖:
- catfan/medoo ^2.2
📦 安装
🚀 快速开始
1. 基本使用
2. SQLite 内存数据库(测试用)
3. 数据库连接池
4. FastD 框架集成
5. 查询构建器示例
6. 高级配置
📚 API 参考
核心类
FastD\MedooDB\Database- 数据库操作类(继承 Medoo)FastD\MedooDB\DatabasePool- 数据库连接池管理FastD\MedooDB\ServiceProvider\DatabaseServiceProvider- FastD 服务提供者FastD\MedooDB\Listener\BootedEventListener- 启动事件监听器
主要方法
Database 类
继承 Medoo 的所有方法:
select($table, $columns, $where)- 查询数据insert($table, $data)- 插入数据update($table, $data, $where)- 更新数据delete($table, $where)- 删除数据count($table, $where)- 计数query($sql, $map)- 执行原生 SQLaction($callback)- 事务处理reconnect()- 重新连接pdo- 获取 PDO 实例
DatabasePool 类
getDatabase($key, $reconnect)- 获取数据库连接initConnections()- 初始化所有连接onCallback()- 回调事件(用于 Swoole 启动)
🧪 测试
测试使用 SQLite 内存数据库,无需配置真实数据库。
🤝 贡献
欢迎贡献代码、报告问题或提出建议!
- 🐛 报告问题
- 💡 提交功能建议
- 🔧 贡献代码和文档
- ⭐ Star 项目支持
📄 License
MIT License
🔗 相关链接
All versions of medoodb with dependencies
PHP Build Version
Package Version
The package fastd/medoodb contains the following files
Loading the files please wait ...