starlit/db
Composer 安装命令:
composer require starlit/db
包简介
A lightweight database abstraction layer.
关键字:
README 文档
README
A lightweight database/PDO abstraction layer with an ORM like system for mapping data.
Currently only tested with MySQL.
Installation
Add the package as a requirement to your composer.json:
$ composer require starlit/db
Usage example
<?php // Adding a user using SQL $db = new Db('localhost', 'db_user', '****', 'database_name'); $db->insert('users_table', ['name' => 'John Doe']); // Adding a user using object mapping $service = new BasicDbEntityService($db); $user = new User(); $user->setName('John Doe'); $service->save($user);
Requirements
- Requires PHP 7.4 or above.
License
This software is licensed under the BSD 3-Clause License - see the LICENSE file for details.
统计信息
- 总下载量: 51.98k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 4
- 点击次数: 3
- 依赖项目数: 3
- 推荐数: 0
其他信息
- 授权协议: BSD-3-Clause
- 更新时间: 2016-04-04