Add basic README

This commit is contained in:
Daniil Gentili 2024-03-28 23:07:09 +01:00
parent bca7169b3e
commit b6a82d17ce
3 changed files with 41 additions and 0 deletions

2
.gitattributes vendored Normal file
View File

@ -0,0 +1,2 @@
tests/ export-ignore
.vscode/ export-ignore

7
README.md Normal file
View File

@ -0,0 +1,7 @@
# Async ORM
Async ORM based on amphp.
Supports MySQL, Redis, Postgres.
Features read and write-back caching, type-specific optimizations, and much more!

32
tests/TestObject.php Normal file
View File

@ -0,0 +1,32 @@
<?php declare(strict_types=1);
namespace danog\AsyncOrm\Test;
use danog\AsyncOrm\DbObject;
final class TestObject extends DbObject
{
public int $loadedCnt = 0;
public int $saveAfterCnt = 0;
public int $saveBeforeCnt = 0;
public mixed $savedProp = null;
public function __sleep()
{
return ['savedProp'];
}
protected function onLoaded(): void
{
$this->loadedCnt++;
}
protected function onAfterSave(): void
{
$this->saveAfterCnt++;
}
protected function onBeforeSave(): void
{
$this->saveBeforeCnt++;
}
}