Go to file
2024-03-31 19:11:42 +02:00
.vscode Fixes 2024-03-28 14:57:59 +01:00
docs Improve docs 2024-03-31 19:11:42 +02:00
examples Improve docs 2024-03-31 19:11:42 +02:00
src Improve docs 2024-03-31 19:11:42 +02:00
tests Improve docs 2024-03-31 19:11:42 +02:00
.gitattributes Add basic README 2024-03-28 23:07:09 +01:00
.gitignore Finalize 2024-03-31 17:05:51 +02:00
.php-cs-fixer.dist.php First commit 2024-03-17 20:20:00 +01:00
composer.json Change license to Apache 2 2024-03-31 18:28:23 +02:00
infection.json5 Rename a few classes 2024-03-31 17:13:03 +02:00
LICENSE Change license to Apache 2 2024-03-31 18:28:23 +02:00
NOTICE Change license to Apache 2 2024-03-31 18:28:23 +02:00
phpunit.xml Finalize 2024-03-31 17:05:51 +02:00
psalm.xml Fixes 2024-03-28 19:00:38 +01:00
README.md Improve docs 2024-03-31 19:11:42 +02:00

Async ORM

Async ORM based on amphp, created by Daniil Gentili daniil@daniil.it and Alexander Pankratov alexander@i-c-a.su.

Supports MySQL, Redis, Postgres.

Features read and write-back caching, type-specific optimizations, and much more!

Installation

composer require danog/async-orm

Usage

There are two main ways to use the ORM: through automatic ORM properties, which automatically connects appropriately marked DbArray properties to the specified database, or by manually instantiating a DbArray with a DbArrayBuilder.

The DbArray obtained through one of the methods above is an abstract array object that automatically stores and fetches elements from the specified database.

/** @var DbArray<TKey, TValue> $arr */

$value = $arr[$key];
$arr[$key] = $newValue;

if (isset($arr[$otherKey])) {
    // Some logic
    unset($arr[$otherKey]);
}

API Documentation

Click here » to view the API documentation.