naftali100/async-orm

There is no license information available for the latest version (v0.1.3.1) of this package.

async orm library

Maintainers

Package info

github.com/naftali100/async-orm

pkg:composer/naftali100/async-orm

Statistics

Installs: 43

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

v0.1.3.1 2023-02-05 00:24 UTC

This package is auto-updated.

Last update: 2026-03-05 07:22:17 UTC


README

async orm lib inspired by redbean

implements only the basic CURD functionality (no relations atm)

usage

almost the same as redbean. notice the yield every time you do db call

Amp\Loop::run(function(){
    yield ORM::connect('127.0.0.1', 'user', 'pass', 'db');

    $user = ORM::create('user');
    $user->name = 'john';
    $userid = yield ROM::store($user);

    $same_user = yield ORM::load('user', $userid);
    print $same_user->id; // id
    print $same_user->name; // john
});

todo

  • tests
  • relations
  • fix structure