marko/database
最新稳定版本:0.5.0
Composer 安装命令:
composer require marko/database
包简介
Marko Framework Database Layer - Entity-driven schema with Data Mapper pattern
README 文档
README
Entity-driven schema definition with the Data Mapper pattern for the Marko framework.
Installation
composer require marko/database
You typically install a driver package (like marko/database-pgsql) which requires this automatically.
Quick Example
use Marko\Database\Attributes\Column; use Marko\Database\Attributes\Table; use Marko\Database\Entity\Entity; use Marko\Database\Repository\Repository; #[Table('posts')] class Post extends Entity { #[Column(primaryKey: true, autoIncrement: true)] public int $id; #[Column(length: 255)] public string $title; #[Column(type: 'json')] public array $metadata = []; } class PostRepository extends Repository { protected const string ENTITY_CLASS = Post::class; }
Documentation
Full usage, API reference, and examples: marko/database
统计信息
- 总下载量: 220
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 1
- 依赖项目数: 10
- 推荐数: 2
其他信息
- 授权协议: MIT
- 更新时间: 2026-03-24