feat: improved abilities of plugins, moved schema fns to ctx

This commit is contained in:
dswbx
2025-06-12 15:29:53 +02:00
parent 9c4aac8843
commit 8b4b63b3cd
17 changed files with 330 additions and 133 deletions

View File

@@ -225,7 +225,7 @@ export class DataController extends Controller {
},
);
return hono.all("*", (c) => c.notFound());
return hono;
}
private getEntityRoutes() {

View File

@@ -12,6 +12,15 @@ export class RelationAccessor {
return this._relations;
}
exists(relation: EntityRelation): boolean {
return this._relations.some(
(r) =>
r.source.entity.name === relation.source.entity.name &&
r.target.entity.name === relation.target.entity.name &&
r.type === relation.type,
);
}
/**
* Searches for the relations of [entity_name]
*/