dev-main 2023-08-24 15:08 UTC

This package is auto-updated.

Last update: 2024-10-24 17:42:00 UTC


README

A Database Object mapping library for PHP.

How To Use

<?php

use Helicon\Db\HeliconDb;

require __DIR__ . '/vendor/autoload.php';

class User {
    public readonly int $id;

    public readonly string $email;
    public readonly string $name;
}

$heliconDb = HeliconDb::create('mysql:host=127.0.0.1;port=3307;dbname=helicon', 'docker', 'docker');

$selectTarget = $heliconDb->select(User::class);
$query = $selectTarget->createQuery()->where()->equals('id', 1)->end();

$users = $selectTarget->execute($query);
var_dump($users);