terminusstudio/ezdb 问题修复 & 功能扩展

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

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

terminusstudio/ezdb

Composer 安装命令:

composer require terminusstudio/ezdb

包简介

ezDB is a lightweight library that provides an easy and fast to deal with databases in PHP. It manages connections, provides a query builder, and a lightweight ORM.

README 文档

README

Latest Version on Packagist Total Downloads ezDB Tests Software License

Notice

This branch contains the latest release of ezDB v1.0. This version is not fully compatible with v0.1 and is also not fully compatible with Laravel Eloquent.

v1.0 only supports PHP 8.1, and it should support PHP 8.2 on release.

Please find v0.1 from here.

Description

ezDB is a lightweight library that provides an easy and fast to deal with databases in PHP. It manages connections, provides a query builder, and a lightweight ORM.

This project was inspired by ezSQL and Laravel Eloquent. It borrows most of its syntax from Eloquent and I would like to thank all the awesome developers that worked have worked on it.

The ORM in this library is lightweight and focuses on providing basic functionalities. If you require more functions you can easily extend the library or use a PHP ORM like DoctrineORM.

Install

With Composer

ezDB can be installed using composer by running the command below,

composer require terminusstudio/ezdb

and require the autoload.php file in your script.

require_once __DIR__ . '/vendor/autoload.php';

Without Composer

ezDB can also be included manually. This is very useful for simple projects that only wants to use ezDB for managing database connections.

Follow the steps below:

  1. Download the latest release from here.
  2. Extract the ezDB folder to your project.
  3. In your program include the following line,
require_once '<PATH TO ezDB>/load.php';
  1. This will include all the files that are necessary for ezDB to function. To improve performance, create a copy of load.php and include only the classes that you will use.

How ezDB Works

ezDB can be seperated into three different parts,

  1. Builder
  2. Connection
  3. Model

The Builder (along with the Processor) are at the core of ezDB. They support generating the SQL queries from code.

The Connection classes allow you to manage database connections using multiple drivers and processors. Support queries, prepared statements etc. A global class manages as many connection to as many database as you need. The connections class also supports the IConnectionAwareBuilder which extends the builders and provides support to directly interact with the database from the builder.

Finally, the Model layer provides a basic ORM and is also capable of managing relationships. It uses the Connection classes, and it's custom builders, ModelAwareBuilder (which extends from ConnectionAwareBuilder) and RelationshipBuilder. It supports more features like timestamps, relationship querying, eager loading etc.

License

Copyright © Terminus Studio

Licensed under the MIT license, see LICENSE.md for details.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2021-04-29

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固