yiisoft / db
Yii Database
Fund package maintenance!
Opencollective
yiisoft
Installs: 308 449
Dependents: 30
Suggesters: 3
Security: 0
Stars: 134
Watchers: 28
Forks: 35
Open Issues: 67
Requires
- php: ^8.0
- ext-ctype: *
- ext-json: *
- ext-mbstring: *
- ext-pdo: *
- psr/log: ^2.0|^3.0
- psr/simple-cache: ^2.0|^3.0
Requires (Dev)
- maglnet/composer-require-checker: ^4.2
- phpunit/phpunit: ^9.6|^10.0
- rector/rector: ^1.0
- roave/infection-static-analysis-plugin: ^1.16
- spatie/phpunit-watcher: ^1.23
- vimeo/psalm: ^4.30|^5.20
- yiisoft/aliases: ^3.0
- yiisoft/cache-file: ^3.1
- yiisoft/di: ^1.0
- yiisoft/event-dispatcher: ^1.0
- yiisoft/json: ^1.0
- yiisoft/log: ^2.0
- yiisoft/var-dumper: ^1.5
- yiisoft/yii-debug: dev-master|dev-php80
- dev-master
- 1.3.0
- 1.2.0
- 1.1.1
- 1.1.0
- 1.0.0
- dev-docker
- dev-refactor-expressions
- dev-drop-table-params
- dev-new-columns-for-v2
- dev-refactor-data-readers
- dev-fix-upgrade
- dev-logger
- dev-add-setter-for-global-default-schema
- dev-phpdoc-specific-type
- dev-enhacement-builder-columns
- dev-598-fix-phpdoc
- dev-old-master
This package is auto-updated.
Last update: 2024-11-25 14:05:06 UTC
README
Yii Database
Yii Database is a framework-agnostic package to work with different types of databases, such as MariaDB, MySQL, MSSQL, Oracle, PostgreSQL and SQLite.
Using the package, you can perform common database tasks such as creating, reading, updating, and deleting records in a database table, as well as executing raw SQL queries.
$rows = (new Query($db)) ->select(['id', 'email']) ->from('{{%user}}') ->where(['last_name' => 'Smith']) ->limit(10) ->all();
The package is designed to be flexible and can be extended to support extra database types or to customize the way it interacts with databases.
There is an ActiveRecord implementation built on top of it. It allows interacting with database tables using objects, similar to the way you would use ORM (Object-Relational Mapping) frameworks like Doctrine or Hibernate.
Requirements
- PHP 8.1 or higher.
Documentation
- Guide: English, Português - Brasil
- Internals
If you need help or have a question, the Yii Forum is a good place for that. You may also check out other Yii Community Resources.
License
The Yii Database is free software. It is released under the terms of the BSD License.
Please see LICENSE
for more information.
Maintained by Yii Software.