My little realization of simple orm just for fun.
$ormy = new Ormy('mysql:dbname=dev;host=localhost', 'root', 'roma', __DIR__.'/Migrations', null);
$sqlQueryUp = "CREATE TABLE `dev`.`main`...;"
$sqlQueryDown = "DROP TABLE `dev`.`main`;"
$ormy->getMigrator()->makeMigration($sqlQueryUp, $sqlQueryDown);
$ormy->getMigrator()->migrateUp();
So, you have made new migration and put it to __DIR__.'/Migrations'
with auto generated namespace 'Migrations'.
$ormy->getMigrator()->migrateDown();
You have called 'down' method in all executed migration and cleaned 'migration version' table in your DB.
$entity = new \Entity\main();
$entity->setText('Hello World!');
$ormy->getManager()->persist($entity);
$entity = new \Entity\main();
$entity->setText('Hello World!');
$ormy->getManager()->persist($entity);
$ormy->getManager()->flush();
$entity = new \Entity\main();
$entity->setText('Hello World!');
$ormy->getManager()->send($entity);
$entity = new \Entity\main();
$entity->setText('Hello World!');
echo $ormy->getManager()->build($entity)->getSQL();
INSERT INTO `dev`.`main`(`text`) VALUES ('Hello World!');
Entity class don't need to have getters only setters to configure.
Manager gets your entity fields as table columns. Example: private string $text => `text`
$ormy->getConnector();
Class is PDO wrap and has base functional to work with DB.
If you want to see class functional check ConnectorInterface.