edges wip

This commit is contained in:
2026-01-10 13:40:33 +02:00
parent ced6146266
commit b0485e77fc
14 changed files with 321 additions and 45 deletions
+22
View File
@@ -0,0 +1,22 @@
<?php namespace Lucent\Core\Repository;
use Illuminate\Support\Facades\DB;
use Lucent\Core\Data\Edge;
use Lucent\Core\Edge\EdgeModule;
class EdgeRepo
{
const TABLE_NAME = "edges";
/**
* Insert multiple edges into the database.
*
* @param Edge[] $edges An array of Edge objects to be inserted.
*/
public static function insertMany(array $edges): void
{
DB::table(self::TABLE_NAME)->insert(
array_map(EdgeModule::toDb(...), $edges),
);
}
}